<?xml version='1.0' encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link href="cpip.css" rel="stylesheet" type="text/css" />
    <title>File: /Users/paulross/dev/linux/linux-3.13/arch/x86/include/asm/paravirt.h</title>
  </head>
  <body>
    <h1>File: /Users/paulross/dev/linux/linux-3.13/arch/x86/include/asm/paravirt.h</h1>
    <p>Green shading in the line number column
means the source is part of the translation unit, red means it is conditionally excluded.
Highlighted line numbers link to the translation unit page. Highlighted macros link to
the macro page.</p>
    <pre><a name="1" /><span class="True">       1:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_noref.html#_X0FTTV9YODZfUEFSQVZJUlRfSF8w"><span class="b">_ASM_X86_PARAVIRT_H</span></a>
<a name="2" /><span class="True">       2:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X0FTTV9YODZfUEFSQVZJUlRfSF8w"><span class="b">_ASM_X86_PARAVIRT_H</span></a>
<a name="3" /><span class="True">       3:</span> <span class="k">/* Various instructions on x86 need to be replaced for</span>
<a name="4" /><span class="True">       4:</span> <span class="k"> * para-virtualization: those hooks are defined here. */</span>
<a name="5" /><span class="True">       5:</span> 
<a name="6" /><span class="False">       6:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_PARAVIRT</span>
<a name="7" /><span class="False">       7:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="b">pgtable_types</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="8" /><span class="False">       8:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="m">asm</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="9" /><span class="False">       9:</span> 
<a name="10" /><span class="False">      10:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="b">paravirt_types</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="11" /><span class="False">      11:</span> 
<a name="12" /><span class="False">      12:</span> <span class="f">#</span><span class="n">ifndef</span> <span class="b">__ASSEMBLY__</span>
<a name="13" /><span class="False">      13:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">bug</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="14" /><span class="False">      14:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">types</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="15" /><span class="False">      15:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">cpumask</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="16" /><span class="False">      16:</span> 
<a name="17" /><span class="False">      17:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <a href="cpu.c_macros_noref.html#_cGFyYXZpcnRfZW5hYmxlZF8w"><span class="b">paravirt_enabled</span></a><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="18" /><span class="False">      18:</span> <span class="f">{</span>
<a name="19" /><span class="False">      19:</span>     <span class="m">return</span> <span class="b">pv_info</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_cGFyYXZpcnRfZW5hYmxlZF8w"><span class="b">paravirt_enabled</span></a><span class="f">;</span>
<a name="20" /><span class="False">      20:</span> <span class="f">}</span>
<a name="21" /><span class="False">      21:</span> 
<a name="22" /><span class="False">      22:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">load_sp0</span><span class="f">(</span><span class="m">struct</span> <span class="b">tss_struct</span> <span class="f">*</span><span class="b">tss</span><span class="f">,</span>
<a name="23" /><span class="False">      23:</span>                  <span class="m">struct</span> <span class="b">thread_struct</span> <span class="f">*</span><span class="b">thread</span><span class="f">)</span>
<a name="24" /><span class="False">      24:</span> <span class="f">{</span>
<a name="25" /><span class="False">      25:</span>     <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">load_sp0</span><span class="f">,</span> <span class="b">tss</span><span class="f">,</span> <span class="b">thread</span><span class="f">)</span><span class="f">;</span>
<a name="26" /><span class="False">      26:</span> <span class="f">}</span>
<a name="27" /><span class="False">      27:</span> 
<a name="28" /><span class="False">      28:</span> <span class="k">/* The paravirtualized CPUID instruction. */</span>
<a name="29" /><span class="False">      29:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X19jcHVpZF8w"><span class="b">__cpuid</span></a><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="f">*</span><span class="b">eax</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="f">*</span><span class="b">ebx</span><span class="f">,</span>
<a name="30" /><span class="False">      30:</span>                <span class="m">unsigned</span> <span class="m">int</span> <span class="f">*</span><span class="b">ecx</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="f">*</span><span class="b">edx</span><span class="f">)</span>
<a name="31" /><span class="False">      31:</span> <span class="f">{</span>
<a name="32" /><span class="False">      32:</span>     <span class="b">PVOP_VCALL4</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">cpuid</span><span class="f">,</span> <span class="b">eax</span><span class="f">,</span> <span class="b">ebx</span><span class="f">,</span> <span class="b">ecx</span><span class="f">,</span> <span class="b">edx</span><span class="f">)</span><span class="f">;</span>
<a name="33" /><span class="False">      33:</span> <span class="f">}</span>
<a name="34" /><span class="False">      34:</span> 
<a name="35" /><span class="False">      35:</span> <span class="k">/*</span>
<a name="36" /><span class="False">      36:</span> <span class="k"> * These special macros can be used to get or set a debugging register</span>
<a name="37" /><span class="False">      37:</span> <span class="k"> */</span>
<a name="38" /><span class="False">      38:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">paravirt_get_debugreg</span><span class="f">(</span><span class="m">int</span> <span class="b">reg</span><span class="f">)</span>
<a name="39" /><span class="False">      39:</span> <span class="f">{</span>
<a name="40" /><span class="False">      40:</span>     <span class="m">return</span> <span class="b">PVOP_CALL1</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">get_debugreg</span><span class="f">,</span> <span class="b">reg</span><span class="f">)</span><span class="f">;</span>
<a name="41" /><span class="False">      41:</span> <span class="f">}</span>
<a name="42" /><span class="False">      42:</span> <span class="f">#</span><span class="n">define</span> <span class="b">get_debugreg</span><span class="f">(</span><span class="b">var</span><span class="f">,</span> <span class="b">reg</span><span class="f">)</span> <span class="b">var</span> <span class="f">=</span> <span class="b">paravirt_get_debugreg</span><span class="f">(</span><span class="b">reg</span><span class="f">)</span>
<a name="43" /><span class="False">      43:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">set_debugreg</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">val</span><span class="f">,</span> <span class="m">int</span> <span class="b">reg</span><span class="f">)</span>
<a name="44" /><span class="False">      44:</span> <span class="f">{</span>
<a name="45" /><span class="False">      45:</span>     <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">set_debugreg</span><span class="f">,</span> <span class="b">reg</span><span class="f">,</span> <span class="b">val</span><span class="f">)</span><span class="f">;</span>
<a name="46" /><span class="False">      46:</span> <span class="f">}</span>
<a name="47" /><span class="False">      47:</span> 
<a name="48" /><span class="False">      48:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">clts</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="49" /><span class="False">      49:</span> <span class="f">{</span>
<a name="50" /><span class="False">      50:</span>     <span class="b">PVOP_VCALL0</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">clts</span><span class="f">)</span><span class="f">;</span>
<a name="51" /><span class="False">      51:</span> <span class="f">}</span>
<a name="52" /><span class="False">      52:</span> 
<a name="53" /><span class="False">      53:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">read_cr0</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="54" /><span class="False">      54:</span> <span class="f">{</span>
<a name="55" /><span class="False">      55:</span>     <span class="m">return</span> <span class="b">PVOP_CALL0</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">read_cr0</span><span class="f">)</span><span class="f">;</span>
<a name="56" /><span class="False">      56:</span> <span class="f">}</span>
<a name="57" /><span class="False">      57:</span> 
<a name="58" /><span class="False">      58:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">write_cr0</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">x</span><span class="f">)</span>
<a name="59" /><span class="False">      59:</span> <span class="f">{</span>
<a name="60" /><span class="False">      60:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">write_cr0</span><span class="f">,</span> <span class="b">x</span><span class="f">)</span><span class="f">;</span>
<a name="61" /><span class="False">      61:</span> <span class="f">}</span>
<a name="62" /><span class="False">      62:</span> 
<a name="63" /><span class="False">      63:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">read_cr2</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="64" /><span class="False">      64:</span> <span class="f">{</span>
<a name="65" /><span class="False">      65:</span>     <span class="m">return</span> <span class="b">PVOP_CALL0</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">read_cr2</span><span class="f">)</span><span class="f">;</span>
<a name="66" /><span class="False">      66:</span> <span class="f">}</span>
<a name="67" /><span class="False">      67:</span> 
<a name="68" /><span class="False">      68:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">write_cr2</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">x</span><span class="f">)</span>
<a name="69" /><span class="False">      69:</span> <span class="f">{</span>
<a name="70" /><span class="False">      70:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">write_cr2</span><span class="f">,</span> <span class="b">x</span><span class="f">)</span><span class="f">;</span>
<a name="71" /><span class="False">      71:</span> <span class="f">}</span>
<a name="72" /><span class="False">      72:</span> 
<a name="73" /><span class="False">      73:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">read_cr3</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="74" /><span class="False">      74:</span> <span class="f">{</span>
<a name="75" /><span class="False">      75:</span>     <span class="m">return</span> <span class="b">PVOP_CALL0</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">read_cr3</span><span class="f">)</span><span class="f">;</span>
<a name="76" /><span class="False">      76:</span> <span class="f">}</span>
<a name="77" /><span class="False">      77:</span> 
<a name="78" /><span class="False">      78:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">write_cr3</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">x</span><span class="f">)</span>
<a name="79" /><span class="False">      79:</span> <span class="f">{</span>
<a name="80" /><span class="False">      80:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">write_cr3</span><span class="f">,</span> <span class="b">x</span><span class="f">)</span><span class="f">;</span>
<a name="81" /><span class="False">      81:</span> <span class="f">}</span>
<a name="82" /><span class="False">      82:</span> 
<a name="83" /><span class="False">      83:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">read_cr4</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="84" /><span class="False">      84:</span> <span class="f">{</span>
<a name="85" /><span class="False">      85:</span>     <span class="m">return</span> <span class="b">PVOP_CALL0</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">read_cr4</span><span class="f">)</span><span class="f">;</span>
<a name="86" /><span class="False">      86:</span> <span class="f">}</span>
<a name="87" /><span class="False">      87:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">read_cr4_safe</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="88" /><span class="False">      88:</span> <span class="f">{</span>
<a name="89" /><span class="False">      89:</span>     <span class="m">return</span> <span class="b">PVOP_CALL0</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">read_cr4_safe</span><span class="f">)</span><span class="f">;</span>
<a name="90" /><span class="False">      90:</span> <span class="f">}</span>
<a name="91" /><span class="False">      91:</span> 
<a name="92" /><span class="False">      92:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">write_cr4</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">x</span><span class="f">)</span>
<a name="93" /><span class="False">      93:</span> <span class="f">{</span>
<a name="94" /><span class="False">      94:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">write_cr4</span><span class="f">,</span> <span class="b">x</span><span class="f">)</span><span class="f">;</span>
<a name="95" /><span class="False">      95:</span> <span class="f">}</span>
<a name="96" /><span class="False">      96:</span> 
<a name="97" /><span class="False">      97:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1g4Nl82NF8w"><span class="b">CONFIG_X86_64</span></a>
<a name="98" /><span class="False">      98:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">read_cr8</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="99" /><span class="False">      99:</span> <span class="f">{</span>
<a name="100" /><span class="False">     100:</span>     <span class="m">return</span> <span class="b">PVOP_CALL0</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">read_cr8</span><span class="f">)</span><span class="f">;</span>
<a name="101" /><span class="False">     101:</span> <span class="f">}</span>
<a name="102" /><span class="False">     102:</span> 
<a name="103" /><span class="False">     103:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">write_cr8</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">x</span><span class="f">)</span>
<a name="104" /><span class="False">     104:</span> <span class="f">{</span>
<a name="105" /><span class="False">     105:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">write_cr8</span><span class="f">,</span> <span class="b">x</span><span class="f">)</span><span class="f">;</span>
<a name="106" /><span class="False">     106:</span> <span class="f">}</span>
<a name="107" /><span class="False">     107:</span> <span class="f">#</span><span class="n">endif</span>
<a name="108" /><span class="False">     108:</span> 
<a name="109" /><span class="False">     109:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">arch_safe_halt</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="110" /><span class="False">     110:</span> <span class="f">{</span>
<a name="111" /><span class="False">     111:</span>     <span class="b">PVOP_VCALL0</span><span class="f">(</span><span class="b">pv_irq_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c2FmZV9oYWx0XzA_"><span class="b">safe_halt</span></a><span class="f">)</span><span class="f">;</span>
<a name="112" /><span class="False">     112:</span> <span class="f">}</span>
<a name="113" /><span class="False">     113:</span> 
<a name="114" /><span class="False">     114:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">halt</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="115" /><span class="False">     115:</span> <span class="f">{</span>
<a name="116" /><span class="False">     116:</span>     <span class="b">PVOP_VCALL0</span><span class="f">(</span><span class="b">pv_irq_ops</span><span class="f">.</span><span class="b">halt</span><span class="f">)</span><span class="f">;</span>
<a name="117" /><span class="False">     117:</span> <span class="f">}</span>
<a name="118" /><span class="False">     118:</span> 
<a name="119" /><span class="False">     119:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">wbinvd</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="120" /><span class="False">     120:</span> <span class="f">{</span>
<a name="121" /><span class="False">     121:</span>     <span class="b">PVOP_VCALL0</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">wbinvd</span><span class="f">)</span><span class="f">;</span>
<a name="122" /><span class="False">     122:</span> <span class="f">}</span>
<a name="123" /><span class="False">     123:</span> 
<a name="124" /><span class="False">     124:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Z2V0X2tlcm5lbF9ycGxfMA__"><span class="b">get_kernel_rpl</span></a><span class="f">(</span><span class="f">)</span>  <span class="f">(</span><span class="b">pv_info</span><span class="f">.</span><span class="b">kernel_rpl</span><span class="f">)</span>
<a name="125" /><span class="False">     125:</span> 
<a name="126" /><span class="False">     126:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">u64</span> <span class="b">paravirt_read_msr</span><span class="f">(</span><span class="m">unsigned</span> <span class="b">msr</span><span class="f">,</span> <span class="m">int</span> <span class="f">*</span><span class="b">err</span><span class="f">)</span>
<a name="127" /><span class="False">     127:</span> <span class="f">{</span>
<a name="128" /><span class="False">     128:</span>     <span class="m">return</span> <span class="b">PVOP_CALL2</span><span class="f">(</span><span class="b">u64</span><span class="f">,</span> <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">read_msr</span><span class="f">,</span> <span class="b">msr</span><span class="f">,</span> <span class="b">err</span><span class="f">)</span><span class="f">;</span>
<a name="129" /><span class="False">     129:</span> <span class="f">}</span>
<a name="130" /><span class="False">     130:</span> 
<a name="131" /><span class="False">     131:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">paravirt_write_msr</span><span class="f">(</span><span class="m">unsigned</span> <span class="b">msr</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">low</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">high</span><span class="f">)</span>
<a name="132" /><span class="False">     132:</span> <span class="f">{</span>
<a name="133" /><span class="False">     133:</span>     <span class="m">return</span> <span class="b">PVOP_CALL3</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">write_msr</span><span class="f">,</span> <span class="b">msr</span><span class="f">,</span> <span class="b">low</span><span class="f">,</span> <span class="b">high</span><span class="f">)</span><span class="f">;</span>
<a name="134" /><span class="False">     134:</span> <span class="f">}</span>
<a name="135" /><span class="False">     135:</span> 
<a name="136" /><span class="False">     136:</span> <span class="k">/* These should all do BUG_ON(_err), but our headers are too tangled. */</span>
<a name="137" /><span class="False">     137:</span> <span class="f">#</span><span class="n">define</span> <span class="b">rdmsr</span><span class="f">(</span><span class="b">msr</span><span class="f">,</span> <span class="b">val1</span><span class="f">,</span> <span class="b">val2</span><span class="f">)</span>            \
<a name="138" /><span class="False">     138:</span> <span class="m">do</span> <span class="f">{</span>                        \
<a name="139" /><span class="False">     139:</span>     <span class="m">int</span> <span class="b">_err</span><span class="f">;</span>                \
<a name="140" /><span class="False">     140:</span>     <span class="b">u64</span> <span class="b">_l</span> <span class="f">=</span> <span class="b">paravirt_read_msr</span><span class="f">(</span><span class="b">msr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">_err</span><span class="f">)</span><span class="f">;</span>    \
<a name="141" /><span class="False">     141:</span>     <span class="b">val1</span> <span class="f">=</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a><span class="f">)</span><span class="b">_l</span><span class="f">;</span>                \
<a name="142" /><span class="False">     142:</span>     <span class="b">val2</span> <span class="f">=</span> <span class="b">_l</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">;</span>            \
<a name="143" /><span class="False">     143:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="144" /><span class="False">     144:</span> 
<a name="145" /><span class="False">     145:</span> <span class="f">#</span><span class="n">define</span> <span class="b">wrmsr</span><span class="f">(</span><span class="b">msr</span><span class="f">,</span> <span class="b">val1</span><span class="f">,</span> <span class="b">val2</span><span class="f">)</span>            \
<a name="146" /><span class="False">     146:</span> <span class="m">do</span> <span class="f">{</span>                        \
<a name="147" /><span class="False">     147:</span>     <span class="b">paravirt_write_msr</span><span class="f">(</span><span class="b">msr</span><span class="f">,</span> <span class="b">val1</span><span class="f">,</span> <span class="b">val2</span><span class="f">)</span><span class="f">;</span>    \
<a name="148" /><span class="False">     148:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="149" /><span class="False">     149:</span> 
<a name="150" /><span class="False">     150:</span> <span class="f">#</span><span class="n">define</span> <span class="b">rdmsrl</span><span class="f">(</span><span class="b">msr</span><span class="f">,</span> <span class="b">val</span><span class="f">)</span>            \
<a name="151" /><span class="False">     151:</span> <span class="m">do</span> <span class="f">{</span>                        \
<a name="152" /><span class="False">     152:</span>     <span class="m">int</span> <span class="b">_err</span><span class="f">;</span>                \
<a name="153" /><span class="False">     153:</span>     <span class="b">val</span> <span class="f">=</span> <span class="b">paravirt_read_msr</span><span class="f">(</span><span class="b">msr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">_err</span><span class="f">)</span><span class="f">;</span>    \
<a name="154" /><span class="False">     154:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="155" /><span class="False">     155:</span> 
<a name="156" /><span class="False">     156:</span> <span class="f">#</span><span class="n">define</span> <span class="b">wrmsrl</span><span class="f">(</span><span class="b">msr</span><span class="f">,</span> <span class="b">val</span><span class="f">)</span>    <span class="b">wrmsr</span><span class="f">(</span><span class="b">msr</span><span class="f">,</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a><span class="f">)</span><span class="f">(</span><span class="f">(</span><span class="b">u64</span><span class="f">)</span><span class="f">(</span><span class="b">val</span><span class="f">)</span><span class="f">)</span><span class="f">,</span> <span class="f">(</span><span class="f">(</span><span class="b">u64</span><span class="f">)</span><span class="f">(</span><span class="b">val</span><span class="f">)</span><span class="f">)</span><span class="f">&gt;&gt;</span><span class="c">32</span><span class="f">)</span>
<a name="157" /><span class="False">     157:</span> <span class="f">#</span><span class="n">define</span> <span class="b">wrmsr_safe</span><span class="f">(</span><span class="b">msr</span><span class="f">,</span> <span class="b">a</span><span class="f">,</span> <span class="b">b</span><span class="f">)</span>    <span class="b">paravirt_write_msr</span><span class="f">(</span><span class="b">msr</span><span class="f">,</span> <span class="b">a</span><span class="f">,</span> <span class="b">b</span><span class="f">)</span>
<a name="158" /><span class="False">     158:</span> 
<a name="159" /><span class="False">     159:</span> <span class="k">/* rdmsr with exception handling */</span>
<a name="160" /><span class="False">     160:</span> <span class="f">#</span><span class="n">define</span> <span class="b">rdmsr_safe</span><span class="f">(</span><span class="b">msr</span><span class="f">,</span> <span class="b">a</span><span class="f">,</span> <span class="b">b</span><span class="f">)</span>            \
<a name="161" /><span class="False">     161:</span> <span class="f">(</span><span class="f">{</span>                        \
<a name="162" /><span class="False">     162:</span>     <span class="m">int</span> <span class="b">_err</span><span class="f">;</span>                \
<a name="163" /><span class="False">     163:</span>     <span class="b">u64</span> <span class="b">_l</span> <span class="f">=</span> <span class="b">paravirt_read_msr</span><span class="f">(</span><span class="b">msr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">_err</span><span class="f">)</span><span class="f">;</span>    \
<a name="164" /><span class="False">     164:</span>     <span class="f">(</span><span class="f">*</span><span class="b">a</span><span class="f">)</span> <span class="f">=</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a><span class="f">)</span><span class="b">_l</span><span class="f">;</span>                \
<a name="165" /><span class="False">     165:</span>     <span class="f">(</span><span class="f">*</span><span class="b">b</span><span class="f">)</span> <span class="f">=</span> <span class="b">_l</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">;</span>            \
<a name="166" /><span class="False">     166:</span>     <span class="b">_err</span><span class="f">;</span>                    \
<a name="167" /><span class="False">     167:</span> <span class="f">}</span><span class="f">)</span>
<a name="168" /><span class="False">     168:</span> 
<a name="169" /><span class="False">     169:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">rdmsrl_safe</span><span class="f">(</span><span class="m">unsigned</span> <span class="b">msr</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="m">long</span> <span class="f">*</span><span class="b">p</span><span class="f">)</span>
<a name="170" /><span class="False">     170:</span> <span class="f">{</span>
<a name="171" /><span class="False">     171:</span>     <span class="m">int</span> <span class="b">err</span><span class="f">;</span>
<a name="172" /><span class="False">     172:</span> 
<a name="173" /><span class="False">     173:</span>     <span class="f">*</span><span class="b">p</span> <span class="f">=</span> <span class="b">paravirt_read_msr</span><span class="f">(</span><span class="b">msr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">err</span><span class="f">)</span><span class="f">;</span>
<a name="174" /><span class="False">     174:</span>     <span class="m">return</span> <span class="b">err</span><span class="f">;</span>
<a name="175" /><span class="False">     175:</span> <span class="f">}</span>
<a name="176" /><span class="False">     176:</span> 
<a name="177" /><span class="False">     177:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">u64</span> <span class="b">paravirt_read_tsc</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="178" /><span class="False">     178:</span> <span class="f">{</span>
<a name="179" /><span class="False">     179:</span>     <span class="m">return</span> <span class="b">PVOP_CALL0</span><span class="f">(</span><span class="b">u64</span><span class="f">,</span> <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">read_tsc</span><span class="f">)</span><span class="f">;</span>
<a name="180" /><span class="False">     180:</span> <span class="f">}</span>
<a name="181" /><span class="False">     181:</span> 
<a name="182" /><span class="False">     182:</span> <span class="f">#</span><span class="n">define</span> <span class="b">rdtscl</span><span class="f">(</span><span class="b">low</span><span class="f">)</span>                \
<a name="183" /><span class="False">     183:</span> <span class="m">do</span> <span class="f">{</span>                        \
<a name="184" /><span class="False">     184:</span>     <span class="b">u64</span> <span class="b">_l</span> <span class="f">=</span> <span class="b">paravirt_read_tsc</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>        \
<a name="185" /><span class="False">     185:</span>     <span class="b">low</span> <span class="f">=</span> <span class="f">(</span><span class="m">int</span><span class="f">)</span><span class="b">_l</span><span class="f">;</span>                \
<a name="186" /><span class="False">     186:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="187" /><span class="False">     187:</span> 
<a name="188" /><span class="False">     188:</span> <span class="f">#</span><span class="n">define</span> <span class="b">rdtscll</span><span class="f">(</span><span class="b">val</span><span class="f">)</span> <span class="f">(</span><span class="b">val</span> <span class="f">=</span> <span class="b">paravirt_read_tsc</span><span class="f">(</span><span class="f">)</span><span class="f">)</span>
<a name="189" /><span class="False">     189:</span> 
<a name="190" /><span class="False">     190:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="m">long</span> <span class="b">paravirt_sched_clock</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="191" /><span class="False">     191:</span> <span class="f">{</span>
<a name="192" /><span class="False">     192:</span>     <span class="m">return</span> <span class="b">PVOP_CALL0</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="m">long</span><span class="f">,</span> <span class="b">pv_time_ops</span><span class="f">.</span><span class="b">sched_clock</span><span class="f">)</span><span class="f">;</span>
<a name="193" /><span class="False">     193:</span> <span class="f">}</span>
<a name="194" /><span class="False">     194:</span> 
<a name="195" /><span class="False">     195:</span> <span class="m">struct</span> <span class="b">static_key</span><span class="f">;</span>
<a name="196" /><span class="False">     196:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">static_key</span> <span class="b">paravirt_steal_enabled</span><span class="f">;</span>
<a name="197" /><span class="False">     197:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">static_key</span> <span class="b">paravirt_steal_rq_enabled</span><span class="f">;</span>
<a name="198" /><span class="False">     198:</span> 
<a name="199" /><span class="False">     199:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">u64</span> <span class="b">paravirt_steal_clock</span><span class="f">(</span><span class="m">int</span> <span class="b">cpu</span><span class="f">)</span>
<a name="200" /><span class="False">     200:</span> <span class="f">{</span>
<a name="201" /><span class="False">     201:</span>     <span class="m">return</span> <span class="b">PVOP_CALL1</span><span class="f">(</span><span class="b">u64</span><span class="f">,</span> <span class="b">pv_time_ops</span><span class="f">.</span><span class="b">steal_clock</span><span class="f">,</span> <span class="b">cpu</span><span class="f">)</span><span class="f">;</span>
<a name="202" /><span class="False">     202:</span> <span class="f">}</span>
<a name="203" /><span class="False">     203:</span> 
<a name="204" /><span class="False">     204:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="m">long</span> <span class="b">paravirt_read_pmc</span><span class="f">(</span><span class="m">int</span> <span class="b">counter</span><span class="f">)</span>
<a name="205" /><span class="False">     205:</span> <span class="f">{</span>
<a name="206" /><span class="False">     206:</span>     <span class="m">return</span> <span class="b">PVOP_CALL1</span><span class="f">(</span><span class="b">u64</span><span class="f">,</span> <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">read_pmc</span><span class="f">,</span> <span class="b">counter</span><span class="f">)</span><span class="f">;</span>
<a name="207" /><span class="False">     207:</span> <span class="f">}</span>
<a name="208" /><span class="False">     208:</span> 
<a name="209" /><span class="False">     209:</span> <span class="f">#</span><span class="n">define</span> <span class="b">rdpmc</span><span class="f">(</span><span class="b">counter</span><span class="f">,</span> <span class="b">low</span><span class="f">,</span> <span class="b">high</span><span class="f">)</span>        \
<a name="210" /><span class="False">     210:</span> <span class="m">do</span> <span class="f">{</span>                        \
<a name="211" /><span class="False">     211:</span>     <span class="b">u64</span> <span class="b">_l</span> <span class="f">=</span> <span class="b">paravirt_read_pmc</span><span class="f">(</span><span class="b">counter</span><span class="f">)</span><span class="f">;</span>    \
<a name="212" /><span class="False">     212:</span>     <span class="b">low</span> <span class="f">=</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a><span class="f">)</span><span class="b">_l</span><span class="f">;</span>                \
<a name="213" /><span class="False">     213:</span>     <span class="b">high</span> <span class="f">=</span> <span class="b">_l</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">;</span>            \
<a name="214" /><span class="False">     214:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="215" /><span class="False">     215:</span> 
<a name="216" /><span class="False">     216:</span> <span class="f">#</span><span class="n">define</span> <span class="b">rdpmcl</span><span class="f">(</span><span class="b">counter</span><span class="f">,</span> <span class="b">val</span><span class="f">)</span> <span class="f">(</span><span class="f">(</span><span class="b">val</span><span class="f">)</span> <span class="f">=</span> <span class="b">paravirt_read_pmc</span><span class="f">(</span><span class="b">counter</span><span class="f">)</span><span class="f">)</span>
<a name="217" /><span class="False">     217:</span> 
<a name="218" /><span class="False">     218:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="m">long</span> <span class="b">paravirt_rdtscp</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="f">*</span><span class="b">aux</span><span class="f">)</span>
<a name="219" /><span class="False">     219:</span> <span class="f">{</span>
<a name="220" /><span class="False">     220:</span>     <span class="m">return</span> <span class="b">PVOP_CALL1</span><span class="f">(</span><span class="b">u64</span><span class="f">,</span> <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">read_tscp</span><span class="f">,</span> <span class="b">aux</span><span class="f">)</span><span class="f">;</span>
<a name="221" /><span class="False">     221:</span> <span class="f">}</span>
<a name="222" /><span class="False">     222:</span> 
<a name="223" /><span class="False">     223:</span> <span class="f">#</span><span class="n">define</span> <span class="b">rdtscp</span><span class="f">(</span><span class="b">low</span><span class="f">,</span> <span class="b">high</span><span class="f">,</span> <span class="b">aux</span><span class="f">)</span>                \
<a name="224" /><span class="False">     224:</span> <span class="m">do</span> <span class="f">{</span>                            \
<a name="225" /><span class="False">     225:</span>     <span class="m">int</span> <span class="b">__aux</span><span class="f">;</span>                    \
<a name="226" /><span class="False">     226:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">__val</span> <span class="f">=</span> <span class="b">paravirt_rdtscp</span><span class="f">(</span><span class="f">&amp;</span><span class="b">__aux</span><span class="f">)</span><span class="f">;</span>    \
<a name="227" /><span class="False">     227:</span>     <span class="f">(</span><span class="b">low</span><span class="f">)</span> <span class="f">=</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a><span class="f">)</span><span class="b">__val</span><span class="f">;</span>                \
<a name="228" /><span class="False">     228:</span>     <span class="f">(</span><span class="b">high</span><span class="f">)</span> <span class="f">=</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a><span class="f">)</span><span class="f">(</span><span class="b">__val</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">)</span><span class="f">;</span>            \
<a name="229" /><span class="False">     229:</span>     <span class="f">(</span><span class="b">aux</span><span class="f">)</span> <span class="f">=</span> <span class="b">__aux</span><span class="f">;</span>                    \
<a name="230" /><span class="False">     230:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="231" /><span class="False">     231:</span> 
<a name="232" /><span class="False">     232:</span> <span class="f">#</span><span class="n">define</span> <span class="b">rdtscpll</span><span class="f">(</span><span class="b">val</span><span class="f">,</span> <span class="b">aux</span><span class="f">)</span>                \
<a name="233" /><span class="False">     233:</span> <span class="m">do</span> <span class="f">{</span>                            \
<a name="234" /><span class="False">     234:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">__aux</span><span class="f">;</span>                 \
<a name="235" /><span class="False">     235:</span>     <span class="b">val</span> <span class="f">=</span> <span class="b">paravirt_rdtscp</span><span class="f">(</span><span class="f">&amp;</span><span class="b">__aux</span><span class="f">)</span><span class="f">;</span>            \
<a name="236" /><span class="False">     236:</span>     <span class="f">(</span><span class="b">aux</span><span class="f">)</span> <span class="f">=</span> <span class="b">__aux</span><span class="f">;</span>                    \
<a name="237" /><span class="False">     237:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="238" /><span class="False">     238:</span> 
<a name="239" /><span class="False">     239:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">paravirt_alloc_ldt</span><span class="f">(</span><span class="m">struct</span> <span class="b">desc_struct</span> <span class="f">*</span><span class="b">ldt</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">entries</span><span class="f">)</span>
<a name="240" /><span class="False">     240:</span> <span class="f">{</span>
<a name="241" /><span class="False">     241:</span>     <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">alloc_ldt</span><span class="f">,</span> <span class="b">ldt</span><span class="f">,</span> <span class="b">entries</span><span class="f">)</span><span class="f">;</span>
<a name="242" /><span class="False">     242:</span> <span class="f">}</span>
<a name="243" /><span class="False">     243:</span> 
<a name="244" /><span class="False">     244:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">paravirt_free_ldt</span><span class="f">(</span><span class="m">struct</span> <span class="b">desc_struct</span> <span class="f">*</span><span class="b">ldt</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">entries</span><span class="f">)</span>
<a name="245" /><span class="False">     245:</span> <span class="f">{</span>
<a name="246" /><span class="False">     246:</span>     <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">free_ldt</span><span class="f">,</span> <span class="b">ldt</span><span class="f">,</span> <span class="b">entries</span><span class="f">)</span><span class="f">;</span>
<a name="247" /><span class="False">     247:</span> <span class="f">}</span>
<a name="248" /><span class="False">     248:</span> 
<a name="249" /><span class="False">     249:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">load_TR_desc</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="250" /><span class="False">     250:</span> <span class="f">{</span>
<a name="251" /><span class="False">     251:</span>     <span class="b">PVOP_VCALL0</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">load_tr_desc</span><span class="f">)</span><span class="f">;</span>
<a name="252" /><span class="False">     252:</span> <span class="f">}</span>
<a name="253" /><span class="False">     253:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">load_gdt</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">desc_ptr</span> <span class="f">*</span><span class="b">dtr</span><span class="f">)</span>
<a name="254" /><span class="False">     254:</span> <span class="f">{</span>
<a name="255" /><span class="False">     255:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">load_gdt</span><span class="f">,</span> <span class="b">dtr</span><span class="f">)</span><span class="f">;</span>
<a name="256" /><span class="False">     256:</span> <span class="f">}</span>
<a name="257" /><span class="False">     257:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">load_idt</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">desc_ptr</span> <span class="f">*</span><span class="b">dtr</span><span class="f">)</span>
<a name="258" /><span class="False">     258:</span> <span class="f">{</span>
<a name="259" /><span class="False">     259:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">load_idt</span><span class="f">,</span> <span class="b">dtr</span><span class="f">)</span><span class="f">;</span>
<a name="260" /><span class="False">     260:</span> <span class="f">}</span>
<a name="261" /><span class="False">     261:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">set_ldt</span><span class="f">(</span><span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">addr</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">entries</span><span class="f">)</span>
<a name="262" /><span class="False">     262:</span> <span class="f">{</span>
<a name="263" /><span class="False">     263:</span>     <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">set_ldt</span><span class="f">,</span> <span class="b">addr</span><span class="f">,</span> <span class="b">entries</span><span class="f">)</span><span class="f">;</span>
<a name="264" /><span class="False">     264:</span> <span class="f">}</span>
<a name="265" /><span class="False">     265:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">store_idt</span><span class="f">(</span><span class="m">struct</span> <span class="b">desc_ptr</span> <span class="f">*</span><span class="b">dtr</span><span class="f">)</span>
<a name="266" /><span class="False">     266:</span> <span class="f">{</span>
<a name="267" /><span class="False">     267:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">store_idt</span><span class="f">,</span> <span class="b">dtr</span><span class="f">)</span><span class="f">;</span>
<a name="268" /><span class="False">     268:</span> <span class="f">}</span>
<a name="269" /><span class="False">     269:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">paravirt_store_tr</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="270" /><span class="False">     270:</span> <span class="f">{</span>
<a name="271" /><span class="False">     271:</span>     <span class="m">return</span> <span class="b">PVOP_CALL0</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">store_tr</span><span class="f">)</span><span class="f">;</span>
<a name="272" /><span class="False">     272:</span> <span class="f">}</span>
<a name="273" /><span class="False">     273:</span> <span class="f">#</span><span class="n">define</span> <span class="b">store_tr</span><span class="f">(</span><span class="b">tr</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">tr</span><span class="f">)</span> <span class="f">=</span> <span class="b">paravirt_store_tr</span><span class="f">(</span><span class="f">)</span><span class="f">)</span>
<a name="274" /><span class="False">     274:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">load_TLS</span><span class="f">(</span><span class="m">struct</span> <span class="b">thread_struct</span> <span class="f">*</span><span class="b">t</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">cpu</span><span class="f">)</span>
<a name="275" /><span class="False">     275:</span> <span class="f">{</span>
<a name="276" /><span class="False">     276:</span>     <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">load_tls</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">cpu</span><span class="f">)</span><span class="f">;</span>
<a name="277" /><span class="False">     277:</span> <span class="f">}</span>
<a name="278" /><span class="False">     278:</span> 
<a name="279" /><span class="False">     279:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1g4Nl82NF8w"><span class="b">CONFIG_X86_64</span></a>
<a name="280" /><span class="False">     280:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">load_gs_index</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="b">gs</span><span class="f">)</span>
<a name="281" /><span class="False">     281:</span> <span class="f">{</span>
<a name="282" /><span class="False">     282:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">load_gs_index</span><span class="f">,</span> <span class="b">gs</span><span class="f">)</span><span class="f">;</span>
<a name="283" /><span class="False">     283:</span> <span class="f">}</span>
<a name="284" /><span class="False">     284:</span> <span class="f">#</span><span class="n">endif</span>
<a name="285" /><span class="False">     285:</span> 
<a name="286" /><span class="False">     286:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">write_ldt_entry</span><span class="f">(</span><span class="m">struct</span> <span class="b">desc_struct</span> <span class="f">*</span><span class="b">dt</span><span class="f">,</span> <span class="m">int</span> <span class="b">entry</span><span class="f">,</span>
<a name="287" /><span class="False">     287:</span>                    <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">desc</span><span class="f">)</span>
<a name="288" /><span class="False">     288:</span> <span class="f">{</span>
<a name="289" /><span class="False">     289:</span>     <span class="b">PVOP_VCALL3</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">write_ldt_entry</span><span class="f">,</span> <span class="b">dt</span><span class="f">,</span> <span class="b">entry</span><span class="f">,</span> <span class="b">desc</span><span class="f">)</span><span class="f">;</span>
<a name="290" /><span class="False">     290:</span> <span class="f">}</span>
<a name="291" /><span class="False">     291:</span> 
<a name="292" /><span class="False">     292:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">write_gdt_entry</span><span class="f">(</span><span class="m">struct</span> <span class="b">desc_struct</span> <span class="f">*</span><span class="b">dt</span><span class="f">,</span> <span class="m">int</span> <span class="b">entry</span><span class="f">,</span>
<a name="293" /><span class="False">     293:</span>                    <span class="m">void</span> <span class="f">*</span><span class="b">desc</span><span class="f">,</span> <span class="m">int</span> <span class="b">type</span><span class="f">)</span>
<a name="294" /><span class="False">     294:</span> <span class="f">{</span>
<a name="295" /><span class="False">     295:</span>     <span class="b">PVOP_VCALL4</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">write_gdt_entry</span><span class="f">,</span> <span class="b">dt</span><span class="f">,</span> <span class="b">entry</span><span class="f">,</span> <span class="b">desc</span><span class="f">,</span> <span class="b">type</span><span class="f">)</span><span class="f">;</span>
<a name="296" /><span class="False">     296:</span> <span class="f">}</span>
<a name="297" /><span class="False">     297:</span> 
<a name="298" /><span class="False">     298:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">write_idt_entry</span><span class="f">(</span><span class="b">gate_desc</span> <span class="f">*</span><span class="b">dt</span><span class="f">,</span> <span class="m">int</span> <span class="b">entry</span><span class="f">,</span> <span class="m">const</span> <span class="b">gate_desc</span> <span class="f">*</span><span class="b">g</span><span class="f">)</span>
<a name="299" /><span class="False">     299:</span> <span class="f">{</span>
<a name="300" /><span class="False">     300:</span>     <span class="b">PVOP_VCALL3</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">write_idt_entry</span><span class="f">,</span> <span class="b">dt</span><span class="f">,</span> <span class="b">entry</span><span class="f">,</span> <span class="b">g</span><span class="f">)</span><span class="f">;</span>
<a name="301" /><span class="False">     301:</span> <span class="f">}</span>
<a name="302" /><span class="False">     302:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_c2V0X2lvcGxfbWFza18w"><span class="b">set_iopl_mask</span></a><span class="f">(</span><span class="m">unsigned</span> <span class="b">mask</span><span class="f">)</span>
<a name="303" /><span class="False">     303:</span> <span class="f">{</span>
<a name="304" /><span class="False">     304:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c2V0X2lvcGxfbWFza18w"><span class="b">set_iopl_mask</span></a><span class="f">,</span> <span class="b">mask</span><span class="f">)</span><span class="f">;</span>
<a name="305" /><span class="False">     305:</span> <span class="f">}</span>
<a name="306" /><span class="False">     306:</span> 
<a name="307" /><span class="False">     307:</span> <span class="k">/* The paravirtualized I/O functions */</span>
<a name="308" /><span class="False">     308:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">slow_down_io</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="309" /><span class="False">     309:</span> <span class="f">{</span>
<a name="310" /><span class="False">     310:</span>     <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">io_delay</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="311" /><span class="False">     311:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">REALLY_SLOW_IO</span>
<a name="312" /><span class="False">     312:</span>     <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">io_delay</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="313" /><span class="False">     313:</span>     <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">io_delay</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="314" /><span class="False">     314:</span>     <span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">io_delay</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="315" /><span class="False">     315:</span> <span class="f">#</span><span class="n">endif</span>
<a name="316" /><span class="False">     316:</span> <span class="f">}</span>
<a name="317" /><span class="False">     317:</span> 
<a name="318" /><span class="False">     318:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a>
<a name="319" /><span class="False">     319:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_c3RhcnR1cF9pcGlfaG9va18w"><span class="b">startup_ipi_hook</span></a><span class="f">(</span><span class="m">int</span> <span class="b">phys_apicid</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">start_eip</span><span class="f">,</span>
<a name="320" /><span class="False">     320:</span>                     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">start_esp</span><span class="f">)</span>
<a name="321" /><span class="False">     321:</span> <span class="f">{</span>
<a name="322" /><span class="False">     322:</span>     <span class="b">PVOP_VCALL3</span><span class="f">(</span><span class="b">pv_apic_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c3RhcnR1cF9pcGlfaG9va18w"><span class="b">startup_ipi_hook</span></a><span class="f">,</span>
<a name="323" /><span class="False">     323:</span>             <span class="b">phys_apicid</span><span class="f">,</span> <span class="b">start_eip</span><span class="f">,</span> <span class="b">start_esp</span><span class="f">)</span><span class="f">;</span>
<a name="324" /><span class="False">     324:</span> <span class="f">}</span>
<a name="325" /><span class="False">     325:</span> <span class="f">#</span><span class="n">endif</span>
<a name="326" /><span class="False">     326:</span> 
<a name="327" /><span class="False">     327:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">paravirt_activate_mm</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">prev</span><span class="f">,</span>
<a name="328" /><span class="False">     328:</span>                     <span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">next</span><span class="f">)</span>
<a name="329" /><span class="False">     329:</span> <span class="f">{</span>
<a name="330" /><span class="False">     330:</span>     <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">activate_mm</span><span class="f">,</span> <span class="b">prev</span><span class="f">,</span> <span class="b">next</span><span class="f">)</span><span class="f">;</span>
<a name="331" /><span class="False">     331:</span> <span class="f">}</span>
<a name="332" /><span class="False">     332:</span> 
<a name="333" /><span class="False">     333:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">arch_dup_mmap</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">oldmm</span><span class="f">,</span>
<a name="334" /><span class="False">     334:</span>                  <span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">)</span>
<a name="335" /><span class="False">     335:</span> <span class="f">{</span>
<a name="336" /><span class="False">     336:</span>     <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">dup_mmap</span><span class="f">,</span> <span class="b">oldmm</span><span class="f">,</span> <span class="b">mm</span><span class="f">)</span><span class="f">;</span>
<a name="337" /><span class="False">     337:</span> <span class="f">}</span>
<a name="338" /><span class="False">     338:</span> 
<a name="339" /><span class="False">     339:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">arch_exit_mmap</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">)</span>
<a name="340" /><span class="False">     340:</span> <span class="f">{</span>
<a name="341" /><span class="False">     341:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">exit_mmap</span><span class="f">,</span> <span class="b">mm</span><span class="f">)</span><span class="f">;</span>
<a name="342" /><span class="False">     342:</span> <span class="f">}</span>
<a name="343" /><span class="False">     343:</span> 
<a name="344" /><span class="False">     344:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">__flush_tlb</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="345" /><span class="False">     345:</span> <span class="f">{</span>
<a name="346" /><span class="False">     346:</span>     <span class="b">PVOP_VCALL0</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">flush_tlb_user</span><span class="f">)</span><span class="f">;</span>
<a name="347" /><span class="False">     347:</span> <span class="f">}</span>
<a name="348" /><span class="False">     348:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">__flush_tlb_global</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="349" /><span class="False">     349:</span> <span class="f">{</span>
<a name="350" /><span class="False">     350:</span>     <span class="b">PVOP_VCALL0</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">flush_tlb_kernel</span><span class="f">)</span><span class="f">;</span>
<a name="351" /><span class="False">     351:</span> <span class="f">}</span>
<a name="352" /><span class="False">     352:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">__flush_tlb_single</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">)</span>
<a name="353" /><span class="False">     353:</span> <span class="f">{</span>
<a name="354" /><span class="False">     354:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">flush_tlb_single</span><span class="f">,</span> <span class="b">addr</span><span class="f">)</span><span class="f">;</span>
<a name="355" /><span class="False">     355:</span> <span class="f">}</span>
<a name="356" /><span class="False">     356:</span> 
<a name="357" /><span class="False">     357:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">flush_tlb_others</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">cpumask</span> <span class="f">*</span><span class="b">cpumask</span><span class="f">,</span>
<a name="358" /><span class="False">     358:</span>                     <span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span>
<a name="359" /><span class="False">     359:</span>                     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">start</span><span class="f">,</span>
<a name="360" /><span class="False">     360:</span>                     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">end</span><span class="f">)</span>
<a name="361" /><span class="False">     361:</span> <span class="f">{</span>
<a name="362" /><span class="False">     362:</span>     <span class="b">PVOP_VCALL4</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">flush_tlb_others</span><span class="f">,</span> <span class="b">cpumask</span><span class="f">,</span> <span class="b">mm</span><span class="f">,</span> <span class="b">start</span><span class="f">,</span> <span class="b">end</span><span class="f">)</span><span class="f">;</span>
<a name="363" /><span class="False">     363:</span> <span class="f">}</span>
<a name="364" /><span class="False">     364:</span> 
<a name="365" /><span class="False">     365:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">paravirt_pgd_alloc</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">)</span>
<a name="366" /><span class="False">     366:</span> <span class="f">{</span>
<a name="367" /><span class="False">     367:</span>     <span class="m">return</span> <span class="b">PVOP_CALL1</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">pgd_alloc</span><span class="f">,</span> <span class="b">mm</span><span class="f">)</span><span class="f">;</span>
<a name="368" /><span class="False">     368:</span> <span class="f">}</span>
<a name="369" /><span class="False">     369:</span> 
<a name="370" /><span class="False">     370:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">paravirt_pgd_free</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="b">pgd_t</span> <span class="f">*</span><span class="b">pgd</span><span class="f">)</span>
<a name="371" /><span class="False">     371:</span> <span class="f">{</span>
<a name="372" /><span class="False">     372:</span>     <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">pgd_free</span><span class="f">,</span> <span class="b">mm</span><span class="f">,</span> <span class="b">pgd</span><span class="f">)</span><span class="f">;</span>
<a name="373" /><span class="False">     373:</span> <span class="f">}</span>
<a name="374" /><span class="False">     374:</span> 
<a name="375" /><span class="False">     375:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">paravirt_alloc_pte</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">pfn</span><span class="f">)</span>
<a name="376" /><span class="False">     376:</span> <span class="f">{</span>
<a name="377" /><span class="False">     377:</span>     <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">alloc_pte</span><span class="f">,</span> <span class="b">mm</span><span class="f">,</span> <span class="b">pfn</span><span class="f">)</span><span class="f">;</span>
<a name="378" /><span class="False">     378:</span> <span class="f">}</span>
<a name="379" /><span class="False">     379:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">paravirt_release_pte</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">pfn</span><span class="f">)</span>
<a name="380" /><span class="False">     380:</span> <span class="f">{</span>
<a name="381" /><span class="False">     381:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">release_pte</span><span class="f">,</span> <span class="b">pfn</span><span class="f">)</span><span class="f">;</span>
<a name="382" /><span class="False">     382:</span> <span class="f">}</span>
<a name="383" /><span class="False">     383:</span> 
<a name="384" /><span class="False">     384:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">paravirt_alloc_pmd</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">pfn</span><span class="f">)</span>
<a name="385" /><span class="False">     385:</span> <span class="f">{</span>
<a name="386" /><span class="False">     386:</span>     <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">alloc_pmd</span><span class="f">,</span> <span class="b">mm</span><span class="f">,</span> <span class="b">pfn</span><span class="f">)</span><span class="f">;</span>
<a name="387" /><span class="False">     387:</span> <span class="f">}</span>
<a name="388" /><span class="False">     388:</span> 
<a name="389" /><span class="False">     389:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">paravirt_release_pmd</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">pfn</span><span class="f">)</span>
<a name="390" /><span class="False">     390:</span> <span class="f">{</span>
<a name="391" /><span class="False">     391:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">release_pmd</span><span class="f">,</span> <span class="b">pfn</span><span class="f">)</span><span class="f">;</span>
<a name="392" /><span class="False">     392:</span> <span class="f">}</span>
<a name="393" /><span class="False">     393:</span> 
<a name="394" /><span class="False">     394:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">paravirt_alloc_pud</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">pfn</span><span class="f">)</span>
<a name="395" /><span class="False">     395:</span> <span class="f">{</span>
<a name="396" /><span class="False">     396:</span>     <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">alloc_pud</span><span class="f">,</span> <span class="b">mm</span><span class="f">,</span> <span class="b">pfn</span><span class="f">)</span><span class="f">;</span>
<a name="397" /><span class="False">     397:</span> <span class="f">}</span>
<a name="398" /><span class="False">     398:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">paravirt_release_pud</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">pfn</span><span class="f">)</span>
<a name="399" /><span class="False">     399:</span> <span class="f">{</span>
<a name="400" /><span class="False">     400:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">release_pud</span><span class="f">,</span> <span class="b">pfn</span><span class="f">)</span><span class="f">;</span>
<a name="401" /><span class="False">     401:</span> <span class="f">}</span>
<a name="402" /><span class="False">     402:</span> 
<a name="403" /><span class="False">     403:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_cHRlX3VwZGF0ZV8w"><span class="b">pte_update</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">,</span>
<a name="404" /><span class="False">     404:</span>                   <span class="b">pte_t</span> <span class="f">*</span><span class="b">ptep</span><span class="f">)</span>
<a name="405" /><span class="False">     405:</span> <span class="f">{</span>
<a name="406" /><span class="False">     406:</span>     <span class="b">PVOP_VCALL3</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_ref.html#_cHRlX3VwZGF0ZV8w"><span class="b">pte_update</span></a><span class="f">,</span> <span class="b">mm</span><span class="f">,</span> <span class="b">addr</span><span class="f">,</span> <span class="b">ptep</span><span class="f">)</span><span class="f">;</span>
<a name="407" /><span class="False">     407:</span> <span class="f">}</span>
<a name="408" /><span class="False">     408:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_cG1kX3VwZGF0ZV8w"><span class="b">pmd_update</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">,</span>
<a name="409" /><span class="False">     409:</span>                   <span class="b">pmd_t</span> <span class="f">*</span><span class="b">pmdp</span><span class="f">)</span>
<a name="410" /><span class="False">     410:</span> <span class="f">{</span>
<a name="411" /><span class="False">     411:</span>     <span class="b">PVOP_VCALL3</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_ref.html#_cG1kX3VwZGF0ZV8w"><span class="b">pmd_update</span></a><span class="f">,</span> <span class="b">mm</span><span class="f">,</span> <span class="b">addr</span><span class="f">,</span> <span class="b">pmdp</span><span class="f">)</span><span class="f">;</span>
<a name="412" /><span class="False">     412:</span> <span class="f">}</span>
<a name="413" /><span class="False">     413:</span> 
<a name="414" /><span class="False">     414:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_cHRlX3VwZGF0ZV9kZWZlcl8w"><span class="b">pte_update_defer</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">,</span>
<a name="415" /><span class="False">     415:</span>                     <span class="b">pte_t</span> <span class="f">*</span><span class="b">ptep</span><span class="f">)</span>
<a name="416" /><span class="False">     416:</span> <span class="f">{</span>
<a name="417" /><span class="False">     417:</span>     <span class="b">PVOP_VCALL3</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_cHRlX3VwZGF0ZV9kZWZlcl8w"><span class="b">pte_update_defer</span></a><span class="f">,</span> <span class="b">mm</span><span class="f">,</span> <span class="b">addr</span><span class="f">,</span> <span class="b">ptep</span><span class="f">)</span><span class="f">;</span>
<a name="418" /><span class="False">     418:</span> <span class="f">}</span>
<a name="419" /><span class="False">     419:</span> 
<a name="420" /><span class="False">     420:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_cG1kX3VwZGF0ZV9kZWZlcl8w"><span class="b">pmd_update_defer</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">,</span>
<a name="421" /><span class="False">     421:</span>                     <span class="b">pmd_t</span> <span class="f">*</span><span class="b">pmdp</span><span class="f">)</span>
<a name="422" /><span class="False">     422:</span> <span class="f">{</span>
<a name="423" /><span class="False">     423:</span>     <span class="b">PVOP_VCALL3</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_cG1kX3VwZGF0ZV9kZWZlcl8w"><span class="b">pmd_update_defer</span></a><span class="f">,</span> <span class="b">mm</span><span class="f">,</span> <span class="b">addr</span><span class="f">,</span> <span class="b">pmdp</span><span class="f">)</span><span class="f">;</span>
<a name="424" /><span class="False">     424:</span> <span class="f">}</span>
<a name="425" /><span class="False">     425:</span> 
<a name="426" /><span class="False">     426:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pte_t</span> <a href="cpu.c_macros_ref.html#_X19wdGVfMA__"><span class="b">__pte</span></a><span class="f">(</span><span class="b">pteval_t</span> <span class="b">val</span><span class="f">)</span>
<a name="427" /><span class="False">     427:</span> <span class="f">{</span>
<a name="428" /><span class="False">     428:</span>     <span class="b">pteval_t</span> <span class="b">ret</span><span class="f">;</span>
<a name="429" /><span class="False">     429:</span> 
<a name="430" /><span class="False">     430:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pteval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="431" /><span class="False">     431:</span>         <span class="b">ret</span> <span class="f">=</span> <span class="b">PVOP_CALLEE2</span><span class="f">(</span><span class="b">pteval_t</span><span class="f">,</span>
<a name="432" /><span class="False">     432:</span>                    <span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">make_pte</span><span class="f">,</span>
<a name="433" /><span class="False">     433:</span>                    <span class="b">val</span><span class="f">,</span> <span class="f">(</span><span class="b">u64</span><span class="f">)</span><span class="b">val</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">)</span><span class="f">;</span>
<a name="434" /><span class="False">     434:</span>     <span class="m">else</span>
<a name="435" /><span class="False">     435:</span>         <span class="b">ret</span> <span class="f">=</span> <span class="b">PVOP_CALLEE1</span><span class="f">(</span><span class="b">pteval_t</span><span class="f">,</span>
<a name="436" /><span class="False">     436:</span>                    <span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">make_pte</span><span class="f">,</span>
<a name="437" /><span class="False">     437:</span>                    <span class="b">val</span><span class="f">)</span><span class="f">;</span>
<a name="438" /><span class="False">     438:</span> 
<a name="439" /><span class="False">     439:</span>     <span class="m">return</span> <span class="f">(</span><span class="b">pte_t</span><span class="f">)</span> <span class="f">{</span> <span class="f">.</span><span class="b">pte</span> <span class="f">=</span> <span class="b">ret</span> <span class="f">}</span><span class="f">;</span>
<a name="440" /><span class="False">     440:</span> <span class="f">}</span>
<a name="441" /><span class="False">     441:</span> 
<a name="442" /><span class="False">     442:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pteval_t</span> <a href="cpu.c_macros_ref.html#_cHRlX3ZhbF8w"><span class="b">pte_val</span></a><span class="f">(</span><span class="b">pte_t</span> <span class="b">pte</span><span class="f">)</span>
<a name="443" /><span class="False">     443:</span> <span class="f">{</span>
<a name="444" /><span class="False">     444:</span>     <span class="b">pteval_t</span> <span class="b">ret</span><span class="f">;</span>
<a name="445" /><span class="False">     445:</span> 
<a name="446" /><span class="False">     446:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pteval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="447" /><span class="False">     447:</span>         <span class="b">ret</span> <span class="f">=</span> <span class="b">PVOP_CALLEE2</span><span class="f">(</span><span class="b">pteval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_ref.html#_cHRlX3ZhbF8w"><span class="b">pte_val</span></a><span class="f">,</span>
<a name="448" /><span class="False">     448:</span>                    <span class="b">pte</span><span class="f">.</span><span class="b">pte</span><span class="f">,</span> <span class="f">(</span><span class="b">u64</span><span class="f">)</span><span class="b">pte</span><span class="f">.</span><span class="b">pte</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">)</span><span class="f">;</span>
<a name="449" /><span class="False">     449:</span>     <span class="m">else</span>
<a name="450" /><span class="False">     450:</span>         <span class="b">ret</span> <span class="f">=</span> <span class="b">PVOP_CALLEE1</span><span class="f">(</span><span class="b">pteval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_ref.html#_cHRlX3ZhbF8w"><span class="b">pte_val</span></a><span class="f">,</span>
<a name="451" /><span class="False">     451:</span>                    <span class="b">pte</span><span class="f">.</span><span class="b">pte</span><span class="f">)</span><span class="f">;</span>
<a name="452" /><span class="False">     452:</span> 
<a name="453" /><span class="False">     453:</span>     <span class="m">return</span> <span class="b">ret</span><span class="f">;</span>
<a name="454" /><span class="False">     454:</span> <span class="f">}</span>
<a name="455" /><span class="False">     455:</span> 
<a name="456" /><span class="False">     456:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pgd_t</span> <a href="cpu.c_macros_noref.html#_X19wZ2RfMA__"><span class="b">__pgd</span></a><span class="f">(</span><span class="b">pgdval_t</span> <span class="b">val</span><span class="f">)</span>
<a name="457" /><span class="False">     457:</span> <span class="f">{</span>
<a name="458" /><span class="False">     458:</span>     <span class="b">pgdval_t</span> <span class="b">ret</span><span class="f">;</span>
<a name="459" /><span class="False">     459:</span> 
<a name="460" /><span class="False">     460:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pgdval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="461" /><span class="False">     461:</span>         <span class="b">ret</span> <span class="f">=</span> <span class="b">PVOP_CALLEE2</span><span class="f">(</span><span class="b">pgdval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">make_pgd</span><span class="f">,</span>
<a name="462" /><span class="False">     462:</span>                    <span class="b">val</span><span class="f">,</span> <span class="f">(</span><span class="b">u64</span><span class="f">)</span><span class="b">val</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">)</span><span class="f">;</span>
<a name="463" /><span class="False">     463:</span>     <span class="m">else</span>
<a name="464" /><span class="False">     464:</span>         <span class="b">ret</span> <span class="f">=</span> <span class="b">PVOP_CALLEE1</span><span class="f">(</span><span class="b">pgdval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">make_pgd</span><span class="f">,</span>
<a name="465" /><span class="False">     465:</span>                    <span class="b">val</span><span class="f">)</span><span class="f">;</span>
<a name="466" /><span class="False">     466:</span> 
<a name="467" /><span class="False">     467:</span>     <span class="m">return</span> <span class="f">(</span><span class="b">pgd_t</span><span class="f">)</span> <span class="f">{</span> <span class="b">ret</span> <span class="f">}</span><span class="f">;</span>
<a name="468" /><span class="False">     468:</span> <span class="f">}</span>
<a name="469" /><span class="False">     469:</span> 
<a name="470" /><span class="False">     470:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pgdval_t</span> <a href="cpu.c_macros_ref.html#_cGdkX3ZhbF8w"><span class="b">pgd_val</span></a><span class="f">(</span><span class="b">pgd_t</span> <span class="b">pgd</span><span class="f">)</span>
<a name="471" /><span class="False">     471:</span> <span class="f">{</span>
<a name="472" /><span class="False">     472:</span>     <span class="b">pgdval_t</span> <span class="b">ret</span><span class="f">;</span>
<a name="473" /><span class="False">     473:</span> 
<a name="474" /><span class="False">     474:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pgdval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="475" /><span class="False">     475:</span>         <span class="b">ret</span> <span class="f">=</span>  <span class="b">PVOP_CALLEE2</span><span class="f">(</span><span class="b">pgdval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_ref.html#_cGdkX3ZhbF8w"><span class="b">pgd_val</span></a><span class="f">,</span>
<a name="476" /><span class="False">     476:</span>                     <span class="b">pgd</span><span class="f">.</span><span class="b">pgd</span><span class="f">,</span> <span class="f">(</span><span class="b">u64</span><span class="f">)</span><span class="b">pgd</span><span class="f">.</span><span class="b">pgd</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">)</span><span class="f">;</span>
<a name="477" /><span class="False">     477:</span>     <span class="m">else</span>
<a name="478" /><span class="False">     478:</span>         <span class="b">ret</span> <span class="f">=</span>  <span class="b">PVOP_CALLEE1</span><span class="f">(</span><span class="b">pgdval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_ref.html#_cGdkX3ZhbF8w"><span class="b">pgd_val</span></a><span class="f">,</span>
<a name="479" /><span class="False">     479:</span>                     <span class="b">pgd</span><span class="f">.</span><span class="b">pgd</span><span class="f">)</span><span class="f">;</span>
<a name="480" /><span class="False">     480:</span> 
<a name="481" /><span class="False">     481:</span>     <span class="m">return</span> <span class="b">ret</span><span class="f">;</span>
<a name="482" /><span class="False">     482:</span> <span class="f">}</span>
<a name="483" /><span class="False">     483:</span> 
<a name="484" /><span class="False">     484:</span> <span class="f">#</span><span class="n">define</span>  <span class="b">__HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION</span>
<a name="485" /><span class="False">     485:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pte_t</span> <span class="b">ptep_modify_prot_start</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">,</span>
<a name="486" /><span class="False">     486:</span>                        <span class="b">pte_t</span> <span class="f">*</span><span class="b">ptep</span><span class="f">)</span>
<a name="487" /><span class="False">     487:</span> <span class="f">{</span>
<a name="488" /><span class="False">     488:</span>     <span class="b">pteval_t</span> <span class="b">ret</span><span class="f">;</span>
<a name="489" /><span class="False">     489:</span> 
<a name="490" /><span class="False">     490:</span>     <span class="b">ret</span> <span class="f">=</span> <span class="b">PVOP_CALL3</span><span class="f">(</span><span class="b">pteval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">ptep_modify_prot_start</span><span class="f">,</span>
<a name="491" /><span class="False">     491:</span>              <span class="b">mm</span><span class="f">,</span> <span class="b">addr</span><span class="f">,</span> <span class="b">ptep</span><span class="f">)</span><span class="f">;</span>
<a name="492" /><span class="False">     492:</span> 
<a name="493" /><span class="False">     493:</span>     <span class="m">return</span> <span class="f">(</span><span class="b">pte_t</span><span class="f">)</span> <span class="f">{</span> <span class="f">.</span><span class="b">pte</span> <span class="f">=</span> <span class="b">ret</span> <span class="f">}</span><span class="f">;</span>
<a name="494" /><span class="False">     494:</span> <span class="f">}</span>
<a name="495" /><span class="False">     495:</span> 
<a name="496" /><span class="False">     496:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">ptep_modify_prot_commit</span><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">,</span>
<a name="497" /><span class="False">     497:</span>                        <span class="b">pte_t</span> <span class="f">*</span><span class="b">ptep</span><span class="f">,</span> <span class="b">pte_t</span> <span class="b">pte</span><span class="f">)</span>
<a name="498" /><span class="False">     498:</span> <span class="f">{</span>
<a name="499" /><span class="False">     499:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pteval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="500" /><span class="False">     500:</span>         <span class="k">/* 5 arg words */</span>
<a name="501" /><span class="False">     501:</span>         <span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">ptep_modify_prot_commit</span><span class="f">(</span><span class="b">mm</span><span class="f">,</span> <span class="b">addr</span><span class="f">,</span> <span class="b">ptep</span><span class="f">,</span> <span class="b">pte</span><span class="f">)</span><span class="f">;</span>
<a name="502" /><span class="False">     502:</span>     <span class="m">else</span>
<a name="503" /><span class="False">     503:</span>         <span class="b">PVOP_VCALL4</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">ptep_modify_prot_commit</span><span class="f">,</span>
<a name="504" /><span class="False">     504:</span>                 <span class="b">mm</span><span class="f">,</span> <span class="b">addr</span><span class="f">,</span> <span class="b">ptep</span><span class="f">,</span> <span class="b">pte</span><span class="f">.</span><span class="b">pte</span><span class="f">)</span><span class="f">;</span>
<a name="505" /><span class="False">     505:</span> <span class="f">}</span>
<a name="506" /><span class="False">     506:</span> 
<a name="507" /><span class="False">     507:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_c2V0X3B0ZV8w"><span class="b">set_pte</span></a><span class="f">(</span><span class="b">pte_t</span> <span class="f">*</span><span class="b">ptep</span><span class="f">,</span> <span class="b">pte_t</span> <span class="b">pte</span><span class="f">)</span>
<a name="508" /><span class="False">     508:</span> <span class="f">{</span>
<a name="509" /><span class="False">     509:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pteval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="510" /><span class="False">     510:</span>         <span class="b">PVOP_VCALL3</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c2V0X3B0ZV8w"><span class="b">set_pte</span></a><span class="f">,</span> <span class="b">ptep</span><span class="f">,</span>
<a name="511" /><span class="False">     511:</span>                 <span class="b">pte</span><span class="f">.</span><span class="b">pte</span><span class="f">,</span> <span class="f">(</span><span class="b">u64</span><span class="f">)</span><span class="b">pte</span><span class="f">.</span><span class="b">pte</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">)</span><span class="f">;</span>
<a name="512" /><span class="False">     512:</span>     <span class="m">else</span>
<a name="513" /><span class="False">     513:</span>         <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c2V0X3B0ZV8w"><span class="b">set_pte</span></a><span class="f">,</span> <span class="b">ptep</span><span class="f">,</span>
<a name="514" /><span class="False">     514:</span>                 <span class="b">pte</span><span class="f">.</span><span class="b">pte</span><span class="f">)</span><span class="f">;</span>
<a name="515" /><span class="False">     515:</span> <span class="f">}</span>
<a name="516" /><span class="False">     516:</span> 
<a name="517" /><span class="False">     517:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_c2V0X3B0ZV9hdF8w"><span class="b">set_pte_at</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">,</span>
<a name="518" /><span class="False">     518:</span>                   <span class="b">pte_t</span> <span class="f">*</span><span class="b">ptep</span><span class="f">,</span> <span class="b">pte_t</span> <span class="b">pte</span><span class="f">)</span>
<a name="519" /><span class="False">     519:</span> <span class="f">{</span>
<a name="520" /><span class="False">     520:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pteval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="521" /><span class="False">     521:</span>         <span class="k">/* 5 arg words */</span>
<a name="522" /><span class="False">     522:</span>         <span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_ref.html#_c2V0X3B0ZV9hdF8w"><span class="b">set_pte_at</span></a><span class="f">(</span><span class="b">mm</span><span class="f">,</span> <span class="b">addr</span><span class="f">,</span> <span class="b">ptep</span><span class="f">,</span> <span class="b">pte</span><span class="f">)</span><span class="f">;</span>
<a name="523" /><span class="False">     523:</span>     <span class="m">else</span>
<a name="524" /><span class="False">     524:</span>         <span class="b">PVOP_VCALL4</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_ref.html#_c2V0X3B0ZV9hdF8w"><span class="b">set_pte_at</span></a><span class="f">,</span> <span class="b">mm</span><span class="f">,</span> <span class="b">addr</span><span class="f">,</span> <span class="b">ptep</span><span class="f">,</span> <span class="b">pte</span><span class="f">.</span><span class="b">pte</span><span class="f">)</span><span class="f">;</span>
<a name="525" /><span class="False">     525:</span> <span class="f">}</span>
<a name="526" /><span class="False">     526:</span> 
<a name="527" /><span class="False">     527:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_c2V0X3BtZF9hdF8w"><span class="b">set_pmd_at</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">,</span>
<a name="528" /><span class="False">     528:</span>                   <span class="b">pmd_t</span> <span class="f">*</span><span class="b">pmdp</span><span class="f">,</span> <span class="b">pmd_t</span> <span class="b">pmd</span><span class="f">)</span>
<a name="529" /><span class="False">     529:</span> <span class="f">{</span>
<a name="530" /><span class="False">     530:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pmdval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="531" /><span class="False">     531:</span>         <span class="k">/* 5 arg words */</span>
<a name="532" /><span class="False">     532:</span>         <span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c2V0X3BtZF9hdF8w"><span class="b">set_pmd_at</span></a><span class="f">(</span><span class="b">mm</span><span class="f">,</span> <span class="b">addr</span><span class="f">,</span> <span class="b">pmdp</span><span class="f">,</span> <span class="b">pmd</span><span class="f">)</span><span class="f">;</span>
<a name="533" /><span class="False">     533:</span>     <span class="m">else</span>
<a name="534" /><span class="False">     534:</span>         <span class="b">PVOP_VCALL4</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c2V0X3BtZF9hdF8w"><span class="b">set_pmd_at</span></a><span class="f">,</span> <span class="b">mm</span><span class="f">,</span> <span class="b">addr</span><span class="f">,</span> <span class="b">pmdp</span><span class="f">,</span>
<a name="535" /><span class="False">     535:</span>                 <span class="b">native_pmd_val</span><span class="f">(</span><span class="b">pmd</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="536" /><span class="False">     536:</span> <span class="f">}</span>
<a name="537" /><span class="False">     537:</span> 
<a name="538" /><span class="False">     538:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_c2V0X3BtZF8w"><span class="b">set_pmd</span></a><span class="f">(</span><span class="b">pmd_t</span> <span class="f">*</span><span class="b">pmdp</span><span class="f">,</span> <span class="b">pmd_t</span> <span class="b">pmd</span><span class="f">)</span>
<a name="539" /><span class="False">     539:</span> <span class="f">{</span>
<a name="540" /><span class="False">     540:</span>     <span class="b">pmdval_t</span> <span class="b">val</span> <span class="f">=</span> <span class="b">native_pmd_val</span><span class="f">(</span><span class="b">pmd</span><span class="f">)</span><span class="f">;</span>
<a name="541" /><span class="False">     541:</span> 
<a name="542" /><span class="False">     542:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pmdval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="543" /><span class="False">     543:</span>         <span class="b">PVOP_VCALL3</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c2V0X3BtZF8w"><span class="b">set_pmd</span></a><span class="f">,</span> <span class="b">pmdp</span><span class="f">,</span> <span class="b">val</span><span class="f">,</span> <span class="f">(</span><span class="b">u64</span><span class="f">)</span><span class="b">val</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">)</span><span class="f">;</span>
<a name="544" /><span class="False">     544:</span>     <span class="m">else</span>
<a name="545" /><span class="False">     545:</span>         <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c2V0X3BtZF8w"><span class="b">set_pmd</span></a><span class="f">,</span> <span class="b">pmdp</span><span class="f">,</span> <span class="b">val</span><span class="f">)</span><span class="f">;</span>
<a name="546" /><span class="False">     546:</span> <span class="f">}</span>
<a name="547" /><span class="False">     547:</span> 
<a name="548" /><span class="False">     548:</span> <span class="f">#</span><span class="n">if</span> <a href="cpu.c_macros_ref.html#_UEFHRVRBQkxFX0xFVkVMU18w"><span class="b">PAGETABLE_LEVELS</span></a> <span class="f">&gt;=</span> <span class="c">3</span>
<a name="549" /><span class="False">     549:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pmd_t</span> <a href="cpu.c_macros_ref.html#_X19wbWRfMA__"><span class="b">__pmd</span></a><span class="f">(</span><span class="b">pmdval_t</span> <span class="b">val</span><span class="f">)</span>
<a name="550" /><span class="False">     550:</span> <span class="f">{</span>
<a name="551" /><span class="False">     551:</span>     <span class="b">pmdval_t</span> <span class="b">ret</span><span class="f">;</span>
<a name="552" /><span class="False">     552:</span> 
<a name="553" /><span class="False">     553:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pmdval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="554" /><span class="False">     554:</span>         <span class="b">ret</span> <span class="f">=</span> <span class="b">PVOP_CALLEE2</span><span class="f">(</span><span class="b">pmdval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">make_pmd</span><span class="f">,</span>
<a name="555" /><span class="False">     555:</span>                    <span class="b">val</span><span class="f">,</span> <span class="f">(</span><span class="b">u64</span><span class="f">)</span><span class="b">val</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">)</span><span class="f">;</span>
<a name="556" /><span class="False">     556:</span>     <span class="m">else</span>
<a name="557" /><span class="False">     557:</span>         <span class="b">ret</span> <span class="f">=</span> <span class="b">PVOP_CALLEE1</span><span class="f">(</span><span class="b">pmdval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">make_pmd</span><span class="f">,</span>
<a name="558" /><span class="False">     558:</span>                    <span class="b">val</span><span class="f">)</span><span class="f">;</span>
<a name="559" /><span class="False">     559:</span> 
<a name="560" /><span class="False">     560:</span>     <span class="m">return</span> <span class="f">(</span><span class="b">pmd_t</span><span class="f">)</span> <span class="f">{</span> <span class="b">ret</span> <span class="f">}</span><span class="f">;</span>
<a name="561" /><span class="False">     561:</span> <span class="f">}</span>
<a name="562" /><span class="False">     562:</span> 
<a name="563" /><span class="False">     563:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pmdval_t</span> <a href="cpu.c_macros_ref.html#_cG1kX3ZhbF8w"><span class="b">pmd_val</span></a><span class="f">(</span><span class="b">pmd_t</span> <span class="b">pmd</span><span class="f">)</span>
<a name="564" /><span class="False">     564:</span> <span class="f">{</span>
<a name="565" /><span class="False">     565:</span>     <span class="b">pmdval_t</span> <span class="b">ret</span><span class="f">;</span>
<a name="566" /><span class="False">     566:</span> 
<a name="567" /><span class="False">     567:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pmdval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="568" /><span class="False">     568:</span>         <span class="b">ret</span> <span class="f">=</span>  <span class="b">PVOP_CALLEE2</span><span class="f">(</span><span class="b">pmdval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_ref.html#_cG1kX3ZhbF8w"><span class="b">pmd_val</span></a><span class="f">,</span>
<a name="569" /><span class="False">     569:</span>                     <span class="b">pmd</span><span class="f">.</span><span class="b">pmd</span><span class="f">,</span> <span class="f">(</span><span class="b">u64</span><span class="f">)</span><span class="b">pmd</span><span class="f">.</span><span class="b">pmd</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">)</span><span class="f">;</span>
<a name="570" /><span class="False">     570:</span>     <span class="m">else</span>
<a name="571" /><span class="False">     571:</span>         <span class="b">ret</span> <span class="f">=</span>  <span class="b">PVOP_CALLEE1</span><span class="f">(</span><span class="b">pmdval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_ref.html#_cG1kX3ZhbF8w"><span class="b">pmd_val</span></a><span class="f">,</span>
<a name="572" /><span class="False">     572:</span>                     <span class="b">pmd</span><span class="f">.</span><span class="b">pmd</span><span class="f">)</span><span class="f">;</span>
<a name="573" /><span class="False">     573:</span> 
<a name="574" /><span class="False">     574:</span>     <span class="m">return</span> <span class="b">ret</span><span class="f">;</span>
<a name="575" /><span class="False">     575:</span> <span class="f">}</span>
<a name="576" /><span class="False">     576:</span> 
<a name="577" /><span class="False">     577:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_c2V0X3B1ZF8w"><span class="b">set_pud</span></a><span class="f">(</span><span class="b">pud_t</span> <span class="f">*</span><span class="b">pudp</span><span class="f">,</span> <span class="b">pud_t</span> <span class="b">pud</span><span class="f">)</span>
<a name="578" /><span class="False">     578:</span> <span class="f">{</span>
<a name="579" /><span class="False">     579:</span>     <span class="b">pudval_t</span> <span class="b">val</span> <span class="f">=</span> <span class="b">native_pud_val</span><span class="f">(</span><span class="b">pud</span><span class="f">)</span><span class="f">;</span>
<a name="580" /><span class="False">     580:</span> 
<a name="581" /><span class="False">     581:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pudval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="582" /><span class="False">     582:</span>         <span class="b">PVOP_VCALL3</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c2V0X3B1ZF8w"><span class="b">set_pud</span></a><span class="f">,</span> <span class="b">pudp</span><span class="f">,</span>
<a name="583" /><span class="False">     583:</span>                 <span class="b">val</span><span class="f">,</span> <span class="f">(</span><span class="b">u64</span><span class="f">)</span><span class="b">val</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">)</span><span class="f">;</span>
<a name="584" /><span class="False">     584:</span>     <span class="m">else</span>
<a name="585" /><span class="False">     585:</span>         <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c2V0X3B1ZF8w"><span class="b">set_pud</span></a><span class="f">,</span> <span class="b">pudp</span><span class="f">,</span>
<a name="586" /><span class="False">     586:</span>                 <span class="b">val</span><span class="f">)</span><span class="f">;</span>
<a name="587" /><span class="False">     587:</span> <span class="f">}</span>
<a name="588" /><span class="False">     588:</span> <span class="f">#</span><span class="n">if</span> <a href="cpu.c_macros_ref.html#_UEFHRVRBQkxFX0xFVkVMU18w"><span class="b">PAGETABLE_LEVELS</span></a> <span class="f">==</span> <span class="c">4</span>
<a name="589" /><span class="False">     589:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pud_t</span> <a href="cpu.c_macros_noref.html#_X19wdWRfMA__"><span class="b">__pud</span></a><span class="f">(</span><span class="b">pudval_t</span> <span class="b">val</span><span class="f">)</span>
<a name="590" /><span class="False">     590:</span> <span class="f">{</span>
<a name="591" /><span class="False">     591:</span>     <span class="b">pudval_t</span> <span class="b">ret</span><span class="f">;</span>
<a name="592" /><span class="False">     592:</span> 
<a name="593" /><span class="False">     593:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pudval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="594" /><span class="False">     594:</span>         <span class="b">ret</span> <span class="f">=</span> <span class="b">PVOP_CALLEE2</span><span class="f">(</span><span class="b">pudval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">make_pud</span><span class="f">,</span>
<a name="595" /><span class="False">     595:</span>                    <span class="b">val</span><span class="f">,</span> <span class="f">(</span><span class="b">u64</span><span class="f">)</span><span class="b">val</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">)</span><span class="f">;</span>
<a name="596" /><span class="False">     596:</span>     <span class="m">else</span>
<a name="597" /><span class="False">     597:</span>         <span class="b">ret</span> <span class="f">=</span> <span class="b">PVOP_CALLEE1</span><span class="f">(</span><span class="b">pudval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">make_pud</span><span class="f">,</span>
<a name="598" /><span class="False">     598:</span>                    <span class="b">val</span><span class="f">)</span><span class="f">;</span>
<a name="599" /><span class="False">     599:</span> 
<a name="600" /><span class="False">     600:</span>     <span class="m">return</span> <span class="f">(</span><span class="b">pud_t</span><span class="f">)</span> <span class="f">{</span> <span class="b">ret</span> <span class="f">}</span><span class="f">;</span>
<a name="601" /><span class="False">     601:</span> <span class="f">}</span>
<a name="602" /><span class="False">     602:</span> 
<a name="603" /><span class="False">     603:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">pudval_t</span> <a href="cpu.c_macros_ref.html#_cHVkX3ZhbF8w"><span class="b">pud_val</span></a><span class="f">(</span><span class="b">pud_t</span> <span class="b">pud</span><span class="f">)</span>
<a name="604" /><span class="False">     604:</span> <span class="f">{</span>
<a name="605" /><span class="False">     605:</span>     <span class="b">pudval_t</span> <span class="b">ret</span><span class="f">;</span>
<a name="606" /><span class="False">     606:</span> 
<a name="607" /><span class="False">     607:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pudval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="608" /><span class="False">     608:</span>         <span class="b">ret</span> <span class="f">=</span>  <span class="b">PVOP_CALLEE2</span><span class="f">(</span><span class="b">pudval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_ref.html#_cHVkX3ZhbF8w"><span class="b">pud_val</span></a><span class="f">,</span>
<a name="609" /><span class="False">     609:</span>                     <span class="b">pud</span><span class="f">.</span><span class="b">pud</span><span class="f">,</span> <span class="f">(</span><span class="b">u64</span><span class="f">)</span><span class="b">pud</span><span class="f">.</span><span class="b">pud</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">)</span><span class="f">;</span>
<a name="610" /><span class="False">     610:</span>     <span class="m">else</span>
<a name="611" /><span class="False">     611:</span>         <span class="b">ret</span> <span class="f">=</span>  <span class="b">PVOP_CALLEE1</span><span class="f">(</span><span class="b">pudval_t</span><span class="f">,</span> <span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_ref.html#_cHVkX3ZhbF8w"><span class="b">pud_val</span></a><span class="f">,</span>
<a name="612" /><span class="False">     612:</span>                     <span class="b">pud</span><span class="f">.</span><span class="b">pud</span><span class="f">)</span><span class="f">;</span>
<a name="613" /><span class="False">     613:</span> 
<a name="614" /><span class="False">     614:</span>     <span class="m">return</span> <span class="b">ret</span><span class="f">;</span>
<a name="615" /><span class="False">     615:</span> <span class="f">}</span>
<a name="616" /><span class="False">     616:</span> 
<a name="617" /><span class="False">     617:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_c2V0X3BnZF8w"><span class="b">set_pgd</span></a><span class="f">(</span><span class="b">pgd_t</span> <span class="f">*</span><span class="b">pgdp</span><span class="f">,</span> <span class="b">pgd_t</span> <span class="b">pgd</span><span class="f">)</span>
<a name="618" /><span class="False">     618:</span> <span class="f">{</span>
<a name="619" /><span class="False">     619:</span>     <span class="b">pgdval_t</span> <span class="b">val</span> <span class="f">=</span> <span class="b">native_pgd_val</span><span class="f">(</span><span class="b">pgd</span><span class="f">)</span><span class="f">;</span>
<a name="620" /><span class="False">     620:</span> 
<a name="621" /><span class="False">     621:</span>     <span class="m">if</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">pgdval_t</span><span class="f">)</span> <span class="f">&gt;</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span>
<a name="622" /><span class="False">     622:</span>         <span class="b">PVOP_VCALL3</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c2V0X3BnZF8w"><span class="b">set_pgd</span></a><span class="f">,</span> <span class="b">pgdp</span><span class="f">,</span>
<a name="623" /><span class="False">     623:</span>                 <span class="b">val</span><span class="f">,</span> <span class="f">(</span><span class="b">u64</span><span class="f">)</span><span class="b">val</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">)</span><span class="f">;</span>
<a name="624" /><span class="False">     624:</span>     <span class="m">else</span>
<a name="625" /><span class="False">     625:</span>         <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c2V0X3BnZF8w"><span class="b">set_pgd</span></a><span class="f">,</span> <span class="b">pgdp</span><span class="f">,</span>
<a name="626" /><span class="False">     626:</span>                 <span class="b">val</span><span class="f">)</span><span class="f">;</span>
<a name="627" /><span class="False">     627:</span> <span class="f">}</span>
<a name="628" /><span class="False">     628:</span> 
<a name="629" /><span class="False">     629:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_cGdkX2NsZWFyXzA_"><span class="b">pgd_clear</span></a><span class="f">(</span><span class="b">pgd_t</span> <span class="f">*</span><span class="b">pgdp</span><span class="f">)</span>
<a name="630" /><span class="False">     630:</span> <span class="f">{</span>
<a name="631" /><span class="False">     631:</span>     <a href="cpu.c_macros_noref.html#_c2V0X3BnZF8w"><span class="b">set_pgd</span></a><span class="f">(</span><span class="b">pgdp</span><span class="f">,</span> <a href="cpu.c_macros_noref.html#_X19wZ2RfMA__"><span class="b">__pgd</span></a><span class="f">(</span><span class="c">0</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="632" /><span class="False">     632:</span> <span class="f">}</span>
<a name="633" /><span class="False">     633:</span> 
<a name="634" /><span class="False">     634:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_cHVkX2NsZWFyXzA_"><span class="b">pud_clear</span></a><span class="f">(</span><span class="b">pud_t</span> <span class="f">*</span><span class="b">pudp</span><span class="f">)</span>
<a name="635" /><span class="False">     635:</span> <span class="f">{</span>
<a name="636" /><span class="False">     636:</span>     <a href="cpu.c_macros_noref.html#_c2V0X3B1ZF8w"><span class="b">set_pud</span></a><span class="f">(</span><span class="b">pudp</span><span class="f">,</span> <a href="cpu.c_macros_noref.html#_X19wdWRfMA__"><span class="b">__pud</span></a><span class="f">(</span><span class="c">0</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="637" /><span class="False">     637:</span> <span class="f">}</span>
<a name="638" /><span class="False">     638:</span> 
<a name="639" /><span class="False">     639:</span> <span class="f">#</span><span class="n">endif</span>    <span class="k">/* PAGETABLE_LEVELS == 4 */</span>
<a name="640" /><span class="False">     640:</span> 
<a name="641" /><span class="False">     641:</span> <span class="f">#</span><span class="n">endif</span>    <span class="k">/* PAGETABLE_LEVELS &gt;= 3 */</span>
<a name="642" /><span class="False">     642:</span> 
<a name="643" /><span class="False">     643:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_X86_PAE</span>
<a name="644" /><span class="False">     644:</span> <span class="k">/* Special-case pte-setting operations for PAE, which can&apos;t update a</span>
<a name="645" /><span class="False">     645:</span> <span class="k">   64-bit pte atomically */</span>
<a name="646" /><span class="False">     646:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_c2V0X3B0ZV9hdG9taWNfMA__"><span class="b">set_pte_atomic</span></a><span class="f">(</span><span class="b">pte_t</span> <span class="f">*</span><span class="b">ptep</span><span class="f">,</span> <span class="b">pte_t</span> <span class="b">pte</span><span class="f">)</span>
<a name="647" /><span class="False">     647:</span> <span class="f">{</span>
<a name="648" /><span class="False">     648:</span>     <span class="b">PVOP_VCALL3</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c2V0X3B0ZV9hdG9taWNfMA__"><span class="b">set_pte_atomic</span></a><span class="f">,</span> <span class="b">ptep</span><span class="f">,</span>
<a name="649" /><span class="False">     649:</span>             <span class="b">pte</span><span class="f">.</span><span class="b">pte</span><span class="f">,</span> <span class="b">pte</span><span class="f">.</span><span class="b">pte</span> <span class="f">&gt;&gt;</span> <span class="c">32</span><span class="f">)</span><span class="f">;</span>
<a name="650" /><span class="False">     650:</span> <span class="f">}</span>
<a name="651" /><span class="False">     651:</span> 
<a name="652" /><span class="False">     652:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_cHRlX2NsZWFyXzA_"><span class="b">pte_clear</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">,</span>
<a name="653" /><span class="False">     653:</span>                  <span class="b">pte_t</span> <span class="f">*</span><span class="b">ptep</span><span class="f">)</span>
<a name="654" /><span class="False">     654:</span> <span class="f">{</span>
<a name="655" /><span class="False">     655:</span>     <span class="b">PVOP_VCALL3</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_ref.html#_cHRlX2NsZWFyXzA_"><span class="b">pte_clear</span></a><span class="f">,</span> <span class="b">mm</span><span class="f">,</span> <span class="b">addr</span><span class="f">,</span> <span class="b">ptep</span><span class="f">)</span><span class="f">;</span>
<a name="656" /><span class="False">     656:</span> <span class="f">}</span>
<a name="657" /><span class="False">     657:</span> 
<a name="658" /><span class="False">     658:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_cG1kX2NsZWFyXzA_"><span class="b">pmd_clear</span></a><span class="f">(</span><span class="b">pmd_t</span> <span class="f">*</span><span class="b">pmdp</span><span class="f">)</span>
<a name="659" /><span class="False">     659:</span> <span class="f">{</span>
<a name="660" /><span class="False">     660:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_cG1kX2NsZWFyXzA_"><span class="b">pmd_clear</span></a><span class="f">,</span> <span class="b">pmdp</span><span class="f">)</span><span class="f">;</span>
<a name="661" /><span class="False">     661:</span> <span class="f">}</span>
<a name="662" /><span class="False">     662:</span> <span class="f">#</span><span class="n">else</span>  <span class="k">/* !CONFIG_X86_PAE */</span>
<a name="663" /><span class="False">     663:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_c2V0X3B0ZV9hdG9taWNfMA__"><span class="b">set_pte_atomic</span></a><span class="f">(</span><span class="b">pte_t</span> <span class="f">*</span><span class="b">ptep</span><span class="f">,</span> <span class="b">pte_t</span> <span class="b">pte</span><span class="f">)</span>
<a name="664" /><span class="False">     664:</span> <span class="f">{</span>
<a name="665" /><span class="False">     665:</span>     <a href="cpu.c_macros_noref.html#_c2V0X3B0ZV8w"><span class="b">set_pte</span></a><span class="f">(</span><span class="b">ptep</span><span class="f">,</span> <span class="b">pte</span><span class="f">)</span><span class="f">;</span>
<a name="666" /><span class="False">     666:</span> <span class="f">}</span>
<a name="667" /><span class="False">     667:</span> 
<a name="668" /><span class="False">     668:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_cHRlX2NsZWFyXzA_"><span class="b">pte_clear</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">mm_struct</span> <span class="f">*</span><span class="b">mm</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">,</span>
<a name="669" /><span class="False">     669:</span>                  <span class="b">pte_t</span> <span class="f">*</span><span class="b">ptep</span><span class="f">)</span>
<a name="670" /><span class="False">     670:</span> <span class="f">{</span>
<a name="671" /><span class="False">     671:</span>     <a href="cpu.c_macros_ref.html#_c2V0X3B0ZV9hdF8w"><span class="b">set_pte_at</span></a><span class="f">(</span><span class="b">mm</span><span class="f">,</span> <span class="b">addr</span><span class="f">,</span> <span class="b">ptep</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_X19wdGVfMA__"><span class="b">__pte</span></a><span class="f">(</span><span class="c">0</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="672" /><span class="False">     672:</span> <span class="f">}</span>
<a name="673" /><span class="False">     673:</span> 
<a name="674" /><span class="False">     674:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_cG1kX2NsZWFyXzA_"><span class="b">pmd_clear</span></a><span class="f">(</span><span class="b">pmd_t</span> <span class="f">*</span><span class="b">pmdp</span><span class="f">)</span>
<a name="675" /><span class="False">     675:</span> <span class="f">{</span>
<a name="676" /><span class="False">     676:</span>     <a href="cpu.c_macros_noref.html#_c2V0X3BtZF8w"><span class="b">set_pmd</span></a><span class="f">(</span><span class="b">pmdp</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_X19wbWRfMA__"><span class="b">__pmd</span></a><span class="f">(</span><span class="c">0</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="677" /><span class="False">     677:</span> <span class="f">}</span>
<a name="678" /><span class="False">     678:</span> <span class="f">#</span><span class="n">endif</span>    <span class="k">/* CONFIG_X86_PAE */</span>
<a name="679" /><span class="False">     679:</span> 
<a name="680" /><span class="False">     680:</span> <span class="f">#</span><span class="n">define</span>  <span class="b">__HAVE_ARCH_START_CONTEXT_SWITCH</span>
<a name="681" /><span class="False">     681:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_YXJjaF9zdGFydF9jb250ZXh0X3N3aXRjaF8w"><span class="b">arch_start_context_switch</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">prev</span><span class="f">)</span>
<a name="682" /><span class="False">     682:</span> <span class="f">{</span>
<a name="683" /><span class="False">     683:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">start_context_switch</span><span class="f">,</span> <span class="b">prev</span><span class="f">)</span><span class="f">;</span>
<a name="684" /><span class="False">     684:</span> <span class="f">}</span>
<a name="685" /><span class="False">     685:</span> 
<a name="686" /><span class="False">     686:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_YXJjaF9lbmRfY29udGV4dF9zd2l0Y2hfMA__"><span class="b">arch_end_context_switch</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">next</span><span class="f">)</span>
<a name="687" /><span class="False">     687:</span> <span class="f">{</span>
<a name="688" /><span class="False">     688:</span>     <span class="b">PVOP_VCALL1</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">.</span><span class="b">end_context_switch</span><span class="f">,</span> <span class="b">next</span><span class="f">)</span><span class="f">;</span>
<a name="689" /><span class="False">     689:</span> <span class="f">}</span>
<a name="690" /><span class="False">     690:</span> 
<a name="691" /><span class="False">     691:</span> <span class="f">#</span><span class="n">define</span>  <span class="b">__HAVE_ARCH_ENTER_LAZY_MMU_MODE</span>
<a name="692" /><span class="False">     692:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_YXJjaF9lbnRlcl9sYXp5X21tdV9tb2RlXzA_"><span class="b">arch_enter_lazy_mmu_mode</span></a><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="693" /><span class="False">     693:</span> <span class="f">{</span>
<a name="694" /><span class="False">     694:</span>     <span class="b">PVOP_VCALL0</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">lazy_mode</span><span class="f">.</span><span class="b">enter</span><span class="f">)</span><span class="f">;</span>
<a name="695" /><span class="False">     695:</span> <span class="f">}</span>
<a name="696" /><span class="False">     696:</span> 
<a name="697" /><span class="False">     697:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_YXJjaF9sZWF2ZV9sYXp5X21tdV9tb2RlXzA_"><span class="b">arch_leave_lazy_mmu_mode</span></a><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="698" /><span class="False">     698:</span> <span class="f">{</span>
<a name="699" /><span class="False">     699:</span>     <span class="b">PVOP_VCALL0</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">lazy_mode</span><span class="f">.</span><span class="b">leave</span><span class="f">)</span><span class="f">;</span>
<a name="700" /><span class="False">     700:</span> <span class="f">}</span>
<a name="701" /><span class="False">     701:</span> 
<a name="702" /><span class="False">     702:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_YXJjaF9mbHVzaF9sYXp5X21tdV9tb2RlXzA_"><span class="b">arch_flush_lazy_mmu_mode</span></a><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="703" /><span class="False">     703:</span> <span class="f">{</span>
<a name="704" /><span class="False">     704:</span>     <span class="b">PVOP_VCALL0</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">.</span><span class="b">lazy_mode</span><span class="f">.</span><span class="b">flush</span><span class="f">)</span><span class="f">;</span>
<a name="705" /><span class="False">     705:</span> <span class="f">}</span>
<a name="706" /><span class="False">     706:</span> 
<a name="707" /><span class="False">     707:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">__set_fixmap</span><span class="f">(</span><span class="m">unsigned</span> <span class="k">/* enum fixed_addresses */</span> <span class="b">idx</span><span class="f">,</span>
<a name="708" /><span class="False">     708:</span>                 <span class="b">phys_addr_t</span> <span class="b">phys</span><span class="f">,</span> <span class="b">pgprot_t</span> <span class="b">flags</span><span class="f">)</span>
<a name="709" /><span class="False">     709:</span> <span class="f">{</span>
<a name="710" /><span class="False">     710:</span>     <span class="b">pv_mmu_ops</span><span class="f">.</span><a href="cpu.c_macros_noref.html#_c2V0X2ZpeG1hcF8w"><span class="b">set_fixmap</span></a><span class="f">(</span><span class="b">idx</span><span class="f">,</span> <span class="b">phys</span><span class="f">,</span> <span class="b">flags</span><span class="f">)</span><span class="f">;</span>
<a name="711" /><span class="False">     711:</span> <span class="f">}</span>
<a name="712" /><span class="False">     712:</span> 
<a name="713" /><span class="False">     713:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a><span class="f">)</span> <span class="f">&amp;&amp;</span> <span class="b">defined</span><span class="f">(</span><span class="b">CONFIG_PARAVIRT_SPINLOCKS</span><span class="f">)</span>
<a name="714" /><span class="False">     714:</span> 
<a name="715" /><span class="False">     715:</span> <span class="m">static</span> <a href="cpu.c_macros_ref.html#_X19hbHdheXNfaW5saW5lXzA_"><span class="b">__always_inline</span></a> <span class="m">void</span> <span class="b">__ticket_lock_spinning</span><span class="f">(</span><span class="m">struct</span> <span class="b">arch_spinlock</span> <span class="f">*</span><span class="b">lock</span><span class="f">,</span>
<a name="716" /><span class="False">     716:</span>                             <span class="b">__ticket_t</span> <span class="b">ticket</span><span class="f">)</span>
<a name="717" /><span class="False">     717:</span> <span class="f">{</span>
<a name="718" /><span class="False">     718:</span>     <span class="b">PVOP_VCALLEE2</span><span class="f">(</span><span class="b">pv_lock_ops</span><span class="f">.</span><span class="b">lock_spinning</span><span class="f">,</span> <span class="b">lock</span><span class="f">,</span> <span class="b">ticket</span><span class="f">)</span><span class="f">;</span>
<a name="719" /><span class="False">     719:</span> <span class="f">}</span>
<a name="720" /><span class="False">     720:</span> 
<a name="721" /><span class="False">     721:</span> <span class="m">static</span> <a href="cpu.c_macros_ref.html#_X19hbHdheXNfaW5saW5lXzA_"><span class="b">__always_inline</span></a> <span class="m">void</span> <span class="b">__ticket_unlock_kick</span><span class="f">(</span><span class="m">struct</span> <span class="b">arch_spinlock</span> <span class="f">*</span><span class="b">lock</span><span class="f">,</span>
<a name="722" /><span class="False">     722:</span>                             <span class="b">__ticket_t</span> <span class="b">ticket</span><span class="f">)</span>
<a name="723" /><span class="False">     723:</span> <span class="f">{</span>
<a name="724" /><span class="False">     724:</span>     <span class="b">PVOP_VCALL2</span><span class="f">(</span><span class="b">pv_lock_ops</span><span class="f">.</span><span class="b">unlock_kick</span><span class="f">,</span> <span class="b">lock</span><span class="f">,</span> <span class="b">ticket</span><span class="f">)</span><span class="f">;</span>
<a name="725" /><span class="False">     725:</span> <span class="f">}</span>
<a name="726" /><span class="False">     726:</span> 
<a name="727" /><span class="False">     727:</span> <span class="f">#</span><span class="n">endif</span>
<a name="728" /><span class="False">     728:</span> 
<a name="729" /><span class="False">     729:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_X86_32</span>
<a name="730" /><span class="False">     730:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_SAVE_REGS</span> <span class="e">&quot;pushl %ecx; pushl %edx;&quot;</span>
<a name="731" /><span class="False">     731:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_RESTORE_REGS</span> <span class="e">&quot;popl %edx; popl %ecx;&quot;</span>
<a name="732" /><span class="False">     732:</span> 
<a name="733" /><span class="False">     733:</span> <span class="k">/* save and restore all caller-save registers, except return value */</span>
<a name="734" /><span class="False">     734:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_SAVE_ALL_CALLER_REGS</span>        <span class="e">&quot;pushl %ecx;&quot;</span>
<a name="735" /><span class="False">     735:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_RESTORE_ALL_CALLER_REGS</span>    <span class="e">&quot;popl  %ecx;&quot;</span>
<a name="736" /><span class="False">     736:</span> 
<a name="737" /><span class="False">     737:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_FLAGS_ARG</span> <span class="e">&quot;0&quot;</span>
<a name="738" /><span class="False">     738:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_EXTRA_CLOBBERS</span>
<a name="739" /><span class="False">     739:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_VEXTRA_CLOBBERS</span>
<a name="740" /><span class="False">     740:</span> <span class="f">#</span><span class="n">else</span>
<a name="741" /><span class="False">     741:</span> <span class="k">/* save and restore all caller-save registers, except return value */</span>
<a name="742" /><span class="False">     742:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_SAVE_ALL_CALLER_REGS</span>                        \
<a name="743" /><span class="False">     743:</span>     <span class="e">&quot;push %rcx;&quot;</span>                            \
<a name="744" /><span class="False">     744:</span>     <span class="e">&quot;push %rdx;&quot;</span>                            \
<a name="745" /><span class="False">     745:</span>     <span class="e">&quot;push %rsi;&quot;</span>                            \
<a name="746" /><span class="False">     746:</span>     <span class="e">&quot;push %rdi;&quot;</span>                            \
<a name="747" /><span class="False">     747:</span>     <span class="e">&quot;push %r8;&quot;</span>                            \
<a name="748" /><span class="False">     748:</span>     <span class="e">&quot;push %r9;&quot;</span>                            \
<a name="749" /><span class="False">     749:</span>     <span class="e">&quot;push %r10;&quot;</span>                            \
<a name="750" /><span class="False">     750:</span>     <span class="e">&quot;push %r11;&quot;</span>
<a name="751" /><span class="False">     751:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_RESTORE_ALL_CALLER_REGS</span>                    \
<a name="752" /><span class="False">     752:</span>     <span class="e">&quot;pop %r11;&quot;</span>                            \
<a name="753" /><span class="False">     753:</span>     <span class="e">&quot;pop %r10;&quot;</span>                            \
<a name="754" /><span class="False">     754:</span>     <span class="e">&quot;pop %r9;&quot;</span>                            \
<a name="755" /><span class="False">     755:</span>     <span class="e">&quot;pop %r8;&quot;</span>                            \
<a name="756" /><span class="False">     756:</span>     <span class="e">&quot;pop %rdi;&quot;</span>                            \
<a name="757" /><span class="False">     757:</span>     <span class="e">&quot;pop %rsi;&quot;</span>                            \
<a name="758" /><span class="False">     758:</span>     <span class="e">&quot;pop %rdx;&quot;</span>                            \
<a name="759" /><span class="False">     759:</span>     <span class="e">&quot;pop %rcx;&quot;</span>
<a name="760" /><span class="False">     760:</span> 
<a name="761" /><span class="False">     761:</span> <span class="k">/* We save some registers, but all of them, that&apos;s too much. We clobber all</span>
<a name="762" /><span class="False">     762:</span> <span class="k"> * caller saved registers but the argument parameter */</span>
<a name="763" /><span class="False">     763:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_SAVE_REGS</span> <span class="e">&quot;pushq %%rdi;&quot;</span>
<a name="764" /><span class="False">     764:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_RESTORE_REGS</span> <span class="e">&quot;popq %%rdi;&quot;</span>
<a name="765" /><span class="False">     765:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_EXTRA_CLOBBERS</span> <span class="b">EXTRA_CLOBBERS</span><span class="f">,</span> <span class="e">&quot;rcx&quot;</span> <span class="f">,</span> <span class="e">&quot;rdx&quot;</span><span class="f">,</span> <span class="e">&quot;rsi&quot;</span>
<a name="766" /><span class="False">     766:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_VEXTRA_CLOBBERS</span> <span class="b">EXTRA_CLOBBERS</span><span class="f">,</span> <span class="e">&quot;rdi&quot;</span><span class="f">,</span> <span class="e">&quot;rcx&quot;</span> <span class="f">,</span> <span class="e">&quot;rdx&quot;</span><span class="f">,</span> <span class="e">&quot;rsi&quot;</span>
<a name="767" /><span class="False">     767:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_FLAGS_ARG</span> <span class="e">&quot;D&quot;</span>
<a name="768" /><span class="False">     768:</span> <span class="f">#</span><span class="n">endif</span>
<a name="769" /><span class="False">     769:</span> 
<a name="770" /><span class="False">     770:</span> <span class="k">/*</span>
<a name="771" /><span class="False">     771:</span> <span class="k"> * Generate a thunk around a function which saves all caller-save</span>
<a name="772" /><span class="False">     772:</span> <span class="k"> * registers except for the return value.  This allows C functions to</span>
<a name="773" /><span class="False">     773:</span> <span class="k"> * be called from assembler code where fewer than normal registers are</span>
<a name="774" /><span class="False">     774:</span> <span class="k"> * available.  It may also help code generation around calls from C</span>
<a name="775" /><span class="False">     775:</span> <span class="k"> * code if the common case doesn&apos;t use many registers.</span>
<a name="776" /><span class="False">     776:</span> <span class="k"> *</span>
<a name="777" /><span class="False">     777:</span> <span class="k"> * When a callee is wrapped in a thunk, the caller can assume that all</span>
<a name="778" /><span class="False">     778:</span> <span class="k"> * arg regs and all scratch registers are preserved across the</span>
<a name="779" /><span class="False">     779:</span> <span class="k"> * call. The return value in rax/eax will not be saved, even for void</span>
<a name="780" /><span class="False">     780:</span> <span class="k"> * functions.</span>
<a name="781" /><span class="False">     781:</span> <span class="k"> */</span>
<a name="782" /><span class="False">     782:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_CALLEE_SAVE_REGS_THUNK</span><span class="f">(</span><span class="b">func</span><span class="f">)</span>                    \
<a name="783" /><span class="False">     783:</span>     <span class="m">extern</span> <span class="b">typeof</span><span class="f">(</span><span class="b">func</span><span class="f">)</span> <span class="b">__raw_callee_save_</span><span class="f">##</span><span class="b">func</span><span class="f">;</span>            \
<a name="784" /><span class="False">     784:</span>     <span class="m">static</span> <span class="m">void</span> <span class="f">*</span><span class="b">__</span><span class="f">##</span><span class="b">func</span><span class="f">##</span><span class="b">__</span> <a href="cpu.c_macros_ref.html#_X191c2VkXzA_"><span class="b">__used</span></a> <span class="f">=</span> <span class="b">func</span><span class="f">;</span>            \
<a name="785" /><span class="False">     785:</span>                                     \
<a name="786" /><span class="False">     786:</span>     <span class="m">asm</span><span class="f">(</span><span class="e">&quot;.pushsection .text;&quot;</span>                    \
<a name="787" /><span class="False">     787:</span>         <span class="e">&quot;__raw_callee_save_&quot;</span> <span class="f">#</span><span class="b">func</span> <span class="e">&quot;: &quot;</span>                \
<a name="788" /><span class="False">     788:</span>         <span class="b">PV_SAVE_ALL_CALLER_REGS</span>                    \
<a name="789" /><span class="False">     789:</span>         <span class="e">&quot;call &quot;</span> <span class="f">#</span><span class="b">func</span> <span class="e">&quot;;&quot;</span>                        \
<a name="790" /><span class="False">     790:</span>         <span class="b">PV_RESTORE_ALL_CALLER_REGS</span>                    \
<a name="791" /><span class="False">     791:</span>         <span class="e">&quot;ret;&quot;</span>                            \
<a name="792" /><span class="False">     792:</span>         <span class="e">&quot;.popsection&quot;</span><span class="f">)</span>
<a name="793" /><span class="False">     793:</span> 
<a name="794" /><span class="False">     794:</span> <span class="k">/* Get a reference to a callee-save function */</span>
<a name="795" /><span class="False">     795:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_CALLEE_SAVE</span><span class="f">(</span><span class="b">func</span><span class="f">)</span>                        \
<a name="796" /><span class="False">     796:</span>     <span class="f">(</span><span class="f">(</span><span class="m">struct</span> <span class="b">paravirt_callee_save</span><span class="f">)</span> <span class="f">{</span> <span class="b">__raw_callee_save_</span><span class="f">##</span><span class="b">func</span> <span class="f">}</span><span class="f">)</span>
<a name="797" /><span class="False">     797:</span> 
<a name="798" /><span class="False">     798:</span> <span class="k">/* Promise that &quot;func&quot; already uses the right calling convention */</span>
<a name="799" /><span class="False">     799:</span> <span class="f">#</span><span class="n">define</span> <span class="b">__PV_IS_CALLEE_SAVE</span><span class="f">(</span><span class="b">func</span><span class="f">)</span>            \
<a name="800" /><span class="False">     800:</span>     <span class="f">(</span><span class="f">(</span><span class="m">struct</span> <span class="b">paravirt_callee_save</span><span class="f">)</span> <span class="f">{</span> <span class="b">func</span> <span class="f">}</span><span class="f">)</span>
<a name="801" /><span class="False">     801:</span> 
<a name="802" /><span class="False">     802:</span> <span class="m">static</span> <span class="m">inline</span> <a href="cpu.c_macros_ref.html#_bm90cmFjZV8x"><span class="b">notrace</span></a> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">arch_local_save_flags</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="803" /><span class="False">     803:</span> <span class="f">{</span>
<a name="804" /><span class="False">     804:</span>     <span class="m">return</span> <span class="b">PVOP_CALLEE0</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">pv_irq_ops</span><span class="f">.</span><span class="b">save_fl</span><span class="f">)</span><span class="f">;</span>
<a name="805" /><span class="False">     805:</span> <span class="f">}</span>
<a name="806" /><span class="False">     806:</span> 
<a name="807" /><span class="False">     807:</span> <span class="m">static</span> <span class="m">inline</span> <a href="cpu.c_macros_ref.html#_bm90cmFjZV8x"><span class="b">notrace</span></a> <span class="m">void</span> <span class="b">arch_local_irq_restore</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="b">f</span><span class="f">)</span>
<a name="808" /><span class="False">     808:</span> <span class="f">{</span>
<a name="809" /><span class="False">     809:</span>     <span class="b">PVOP_VCALLEE1</span><span class="f">(</span><span class="b">pv_irq_ops</span><span class="f">.</span><span class="b">restore_fl</span><span class="f">,</span> <span class="b">f</span><span class="f">)</span><span class="f">;</span>
<a name="810" /><span class="False">     810:</span> <span class="f">}</span>
<a name="811" /><span class="False">     811:</span> 
<a name="812" /><span class="False">     812:</span> <span class="m">static</span> <span class="m">inline</span> <a href="cpu.c_macros_ref.html#_bm90cmFjZV8x"><span class="b">notrace</span></a> <span class="m">void</span> <span class="b">arch_local_irq_disable</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="813" /><span class="False">     813:</span> <span class="f">{</span>
<a name="814" /><span class="False">     814:</span>     <span class="b">PVOP_VCALLEE0</span><span class="f">(</span><span class="b">pv_irq_ops</span><span class="f">.</span><span class="b">irq_disable</span><span class="f">)</span><span class="f">;</span>
<a name="815" /><span class="False">     815:</span> <span class="f">}</span>
<a name="816" /><span class="False">     816:</span> 
<a name="817" /><span class="False">     817:</span> <span class="m">static</span> <span class="m">inline</span> <a href="cpu.c_macros_ref.html#_bm90cmFjZV8x"><span class="b">notrace</span></a> <span class="m">void</span> <span class="b">arch_local_irq_enable</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="818" /><span class="False">     818:</span> <span class="f">{</span>
<a name="819" /><span class="False">     819:</span>     <span class="b">PVOP_VCALLEE0</span><span class="f">(</span><span class="b">pv_irq_ops</span><span class="f">.</span><span class="b">irq_enable</span><span class="f">)</span><span class="f">;</span>
<a name="820" /><span class="False">     820:</span> <span class="f">}</span>
<a name="821" /><span class="False">     821:</span> 
<a name="822" /><span class="False">     822:</span> <span class="m">static</span> <span class="m">inline</span> <a href="cpu.c_macros_ref.html#_bm90cmFjZV8x"><span class="b">notrace</span></a> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">arch_local_irq_save</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="823" /><span class="False">     823:</span> <span class="f">{</span>
<a name="824" /><span class="False">     824:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">f</span><span class="f">;</span>
<a name="825" /><span class="False">     825:</span> 
<a name="826" /><span class="False">     826:</span>     <span class="b">f</span> <span class="f">=</span> <span class="b">arch_local_save_flags</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="827" /><span class="False">     827:</span>     <span class="b">arch_local_irq_disable</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="828" /><span class="False">     828:</span>     <span class="m">return</span> <span class="b">f</span><span class="f">;</span>
<a name="829" /><span class="False">     829:</span> <span class="f">}</span>
<a name="830" /><span class="False">     830:</span> 
<a name="831" /><span class="False">     831:</span> 
<a name="832" /><span class="False">     832:</span> <span class="k">/* Make sure as little as possible of this mess escapes. */</span>
<a name="833" /><span class="False">     833:</span> <span class="f">#</span><span class="n">undef</span> <span class="b">PARAVIRT_CALL</span>
<a name="834" /><span class="False">     834:</span> <span class="f">#</span><span class="n">undef</span> <span class="b">__PVOP_CALL</span>
<a name="835" /><span class="False">     835:</span> <span class="f">#</span><span class="n">undef</span> <span class="b">__PVOP_VCALL</span>
<a name="836" /><span class="False">     836:</span> <span class="f">#</span><span class="n">undef</span> <span class="b">PVOP_VCALL0</span>
<a name="837" /><span class="False">     837:</span> <span class="f">#</span><span class="n">undef</span> <span class="b">PVOP_CALL0</span>
<a name="838" /><span class="False">     838:</span> <span class="f">#</span><span class="n">undef</span> <span class="b">PVOP_VCALL1</span>
<a name="839" /><span class="False">     839:</span> <span class="f">#</span><span class="n">undef</span> <span class="b">PVOP_CALL1</span>
<a name="840" /><span class="False">     840:</span> <span class="f">#</span><span class="n">undef</span> <span class="b">PVOP_VCALL2</span>
<a name="841" /><span class="False">     841:</span> <span class="f">#</span><span class="n">undef</span> <span class="b">PVOP_CALL2</span>
<a name="842" /><span class="False">     842:</span> <span class="f">#</span><span class="n">undef</span> <span class="b">PVOP_VCALL3</span>
<a name="843" /><span class="False">     843:</span> <span class="f">#</span><span class="n">undef</span> <span class="b">PVOP_CALL3</span>
<a name="844" /><span class="False">     844:</span> <span class="f">#</span><span class="n">undef</span> <span class="b">PVOP_VCALL4</span>
<a name="845" /><span class="False">     845:</span> <span class="f">#</span><span class="n">undef</span> <span class="b">PVOP_CALL4</span>
<a name="846" /><span class="False">     846:</span> 
<a name="847" /><span class="False">     847:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_ZGVmYXVsdF9iYW5uZXJfMA__"><span class="b">default_banner</span></a><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="848" /><span class="False">     848:</span> 
<a name="849" /><span class="False">     849:</span> <span class="f">#</span><span class="n">else</span>  <span class="k">/* __ASSEMBLY__ */</span>
<a name="850" /><span class="False">     850:</span> 
<a name="851" /><span class="False">     851:</span> <span class="f">#</span><span class="n">define</span> <span class="b">_PVSITE</span><span class="f">(</span><span class="b">ptype</span><span class="f">,</span> <span class="b">clobbers</span><span class="f">,</span> <span class="b">ops</span><span class="f">,</span> <span class="b">word</span><span class="f">,</span> <span class="b">algn</span><span class="f">)</span>    \
<a name="852" /><span class="False">     852:</span> <span class="c">771</span><span class="f">:</span><span class="f">;</span>                        \
<a name="853" /><span class="False">     853:</span>     <span class="b">ops</span><span class="f">;</span>                    \
<a name="854" /><span class="False">     854:</span> <span class="c">772</span><span class="f">:</span><span class="f">;</span>                        \
<a name="855" /><span class="False">     855:</span>     <span class="f">.</span><span class="b">pushsection</span> <span class="f">.</span><span class="b">parainstructions</span><span class="f">,</span><span class="e">&quot;a&quot;</span><span class="f">;</span>    \
<a name="856" /><span class="False">     856:</span>      <span class="f">.</span><span class="b">align</span>    <span class="b">algn</span><span class="f">;</span>                \
<a name="857" /><span class="False">     857:</span>      <span class="b">word</span> <span class="c">771b</span><span class="f">;</span>                \
<a name="858" /><span class="False">     858:</span>      <span class="f">.</span><span class="b">byte</span> <span class="b">ptype</span><span class="f">;</span>                \
<a name="859" /><span class="False">     859:</span>      <span class="f">.</span><span class="b">byte</span> <span class="c">772b</span><span class="f">-</span><span class="c">771b</span><span class="f">;</span>            \
<a name="860" /><span class="False">     860:</span>      <span class="f">.</span><span class="m">short</span> <span class="b">clobbers</span><span class="f">;</span>            \
<a name="861" /><span class="False">     861:</span>     <span class="f">.</span><span class="b">popsection</span>
<a name="862" /><span class="False">     862:</span> 
<a name="863" /><span class="False">     863:</span> 
<a name="864" /><span class="False">     864:</span> <span class="f">#</span><span class="n">define</span> <span class="b">COND_PUSH</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">mask</span><span class="f">,</span> <span class="b">reg</span><span class="f">)</span>            \
<a name="865" /><span class="False">     865:</span>     <span class="f">.</span><span class="m">if</span> <span class="f">(</span><span class="f">(</span><span class="f">~</span><span class="f">(</span><span class="b">set</span><span class="f">)</span><span class="f">)</span> <span class="f">&amp;</span> <span class="b">mask</span><span class="f">)</span><span class="f">;</span> <span class="b">push</span> <span class="f">%</span><span class="b">reg</span><span class="f">;</span> <span class="f">.</span><span class="b">endif</span>
<a name="866" /><span class="False">     866:</span> <span class="f">#</span><span class="n">define</span> <span class="b">COND_POP</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">mask</span><span class="f">,</span> <span class="b">reg</span><span class="f">)</span>            \
<a name="867" /><span class="False">     867:</span>     <span class="f">.</span><span class="m">if</span> <span class="f">(</span><span class="f">(</span><span class="f">~</span><span class="f">(</span><span class="b">set</span><span class="f">)</span><span class="f">)</span> <span class="f">&amp;</span> <span class="b">mask</span><span class="f">)</span><span class="f">;</span> <span class="b">pop</span> <span class="f">%</span><span class="b">reg</span><span class="f">;</span> <span class="f">.</span><span class="b">endif</span>
<a name="868" /><span class="False">     868:</span> 
<a name="869" /><span class="False">     869:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1g4Nl82NF8w"><span class="b">CONFIG_X86_64</span></a>
<a name="870" /><span class="False">     870:</span> 
<a name="871" /><span class="False">     871:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_SAVE_REGS</span><span class="f">(</span><span class="b">set</span><span class="f">)</span>            \
<a name="872" /><span class="False">     872:</span>     <span class="b">COND_PUSH</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_RAX</span><span class="f">,</span> <span class="b">rax</span><span class="f">)</span><span class="f">;</span>        \
<a name="873" /><span class="False">     873:</span>     <span class="b">COND_PUSH</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_RCX</span><span class="f">,</span> <span class="b">rcx</span><span class="f">)</span><span class="f">;</span>        \
<a name="874" /><span class="False">     874:</span>     <span class="b">COND_PUSH</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_RDX</span><span class="f">,</span> <span class="b">rdx</span><span class="f">)</span><span class="f">;</span>        \
<a name="875" /><span class="False">     875:</span>     <span class="b">COND_PUSH</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_RSI</span><span class="f">,</span> <span class="b">rsi</span><span class="f">)</span><span class="f">;</span>        \
<a name="876" /><span class="False">     876:</span>     <span class="b">COND_PUSH</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_RDI</span><span class="f">,</span> <span class="b">rdi</span><span class="f">)</span><span class="f">;</span>        \
<a name="877" /><span class="False">     877:</span>     <span class="b">COND_PUSH</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_R8</span><span class="f">,</span> <span class="b">r8</span><span class="f">)</span><span class="f">;</span>        \
<a name="878" /><span class="False">     878:</span>     <span class="b">COND_PUSH</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_R9</span><span class="f">,</span> <span class="b">r9</span><span class="f">)</span><span class="f">;</span>        \
<a name="879" /><span class="False">     879:</span>     <span class="b">COND_PUSH</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_R10</span><span class="f">,</span> <span class="b">r10</span><span class="f">)</span><span class="f">;</span>        \
<a name="880" /><span class="False">     880:</span>     <span class="b">COND_PUSH</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_R11</span><span class="f">,</span> <span class="b">r11</span><span class="f">)</span>
<a name="881" /><span class="False">     881:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_RESTORE_REGS</span><span class="f">(</span><span class="b">set</span><span class="f">)</span>            \
<a name="882" /><span class="False">     882:</span>     <span class="b">COND_POP</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_R11</span><span class="f">,</span> <span class="b">r11</span><span class="f">)</span><span class="f">;</span>        \
<a name="883" /><span class="False">     883:</span>     <span class="b">COND_POP</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_R10</span><span class="f">,</span> <span class="b">r10</span><span class="f">)</span><span class="f">;</span>        \
<a name="884" /><span class="False">     884:</span>     <span class="b">COND_POP</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_R9</span><span class="f">,</span> <span class="b">r9</span><span class="f">)</span><span class="f">;</span>        \
<a name="885" /><span class="False">     885:</span>     <span class="b">COND_POP</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_R8</span><span class="f">,</span> <span class="b">r8</span><span class="f">)</span><span class="f">;</span>        \
<a name="886" /><span class="False">     886:</span>     <span class="b">COND_POP</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_RDI</span><span class="f">,</span> <span class="b">rdi</span><span class="f">)</span><span class="f">;</span>        \
<a name="887" /><span class="False">     887:</span>     <span class="b">COND_POP</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_RSI</span><span class="f">,</span> <span class="b">rsi</span><span class="f">)</span><span class="f">;</span>        \
<a name="888" /><span class="False">     888:</span>     <span class="b">COND_POP</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_RDX</span><span class="f">,</span> <span class="b">rdx</span><span class="f">)</span><span class="f">;</span>        \
<a name="889" /><span class="False">     889:</span>     <span class="b">COND_POP</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_RCX</span><span class="f">,</span> <span class="b">rcx</span><span class="f">)</span><span class="f">;</span>        \
<a name="890" /><span class="False">     890:</span>     <span class="b">COND_POP</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_RAX</span><span class="f">,</span> <span class="b">rax</span><span class="f">)</span>
<a name="891" /><span class="False">     891:</span> 
<a name="892" /><span class="False">     892:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PARA_PATCH</span><span class="f">(</span><span class="m">struct</span><span class="f">,</span> <span class="b">off</span><span class="f">)</span>        <span class="f">(</span><span class="f">(</span><span class="b">PARAVIRT_PATCH_</span><span class="f">##</span><span class="m">struct</span> <span class="f">+</span> <span class="f">(</span><span class="b">off</span><span class="f">)</span><span class="f">)</span> <span class="f">/</span> <span class="c">8</span><span class="f">)</span>
<a name="893" /><span class="False">     893:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PARA_SITE</span><span class="f">(</span><span class="b">ptype</span><span class="f">,</span> <span class="b">clobbers</span><span class="f">,</span> <span class="b">ops</span><span class="f">)</span> <span class="b">_PVSITE</span><span class="f">(</span><span class="b">ptype</span><span class="f">,</span> <span class="b">clobbers</span><span class="f">,</span> <span class="b">ops</span><span class="f">,</span> <span class="f">.</span><span class="b">quad</span><span class="f">,</span> <span class="c">8</span><span class="f">)</span>
<a name="894" /><span class="False">     894:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PARA_INDIRECT</span><span class="f">(</span><span class="b">addr</span><span class="f">)</span>    <span class="f">*</span><span class="b">addr</span><span class="f">(</span><span class="f">%</span><span class="b">rip</span><span class="f">)</span>
<a name="895" /><span class="False">     895:</span> <span class="f">#</span><span class="n">else</span>
<a name="896" /><span class="False">     896:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_SAVE_REGS</span><span class="f">(</span><span class="b">set</span><span class="f">)</span>            \
<a name="897" /><span class="False">     897:</span>     <span class="b">COND_PUSH</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_EAX</span><span class="f">,</span> <span class="b">eax</span><span class="f">)</span><span class="f">;</span>        \
<a name="898" /><span class="False">     898:</span>     <span class="b">COND_PUSH</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_EDI</span><span class="f">,</span> <span class="b">edi</span><span class="f">)</span><span class="f">;</span>        \
<a name="899" /><span class="False">     899:</span>     <span class="b">COND_PUSH</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_ECX</span><span class="f">,</span> <span class="b">ecx</span><span class="f">)</span><span class="f">;</span>        \
<a name="900" /><span class="False">     900:</span>     <span class="b">COND_PUSH</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_EDX</span><span class="f">,</span> <span class="b">edx</span><span class="f">)</span>
<a name="901" /><span class="False">     901:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PV_RESTORE_REGS</span><span class="f">(</span><span class="b">set</span><span class="f">)</span>            \
<a name="902" /><span class="False">     902:</span>     <span class="b">COND_POP</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_EDX</span><span class="f">,</span> <span class="b">edx</span><span class="f">)</span><span class="f">;</span>        \
<a name="903" /><span class="False">     903:</span>     <span class="b">COND_POP</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_ECX</span><span class="f">,</span> <span class="b">ecx</span><span class="f">)</span><span class="f">;</span>        \
<a name="904" /><span class="False">     904:</span>     <span class="b">COND_POP</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_EDI</span><span class="f">,</span> <span class="b">edi</span><span class="f">)</span><span class="f">;</span>        \
<a name="905" /><span class="False">     905:</span>     <span class="b">COND_POP</span><span class="f">(</span><span class="b">set</span><span class="f">,</span> <span class="b">CLBR_EAX</span><span class="f">,</span> <span class="b">eax</span><span class="f">)</span>
<a name="906" /><span class="False">     906:</span> 
<a name="907" /><span class="False">     907:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PARA_PATCH</span><span class="f">(</span><span class="m">struct</span><span class="f">,</span> <span class="b">off</span><span class="f">)</span>        <span class="f">(</span><span class="f">(</span><span class="b">PARAVIRT_PATCH_</span><span class="f">##</span><span class="m">struct</span> <span class="f">+</span> <span class="f">(</span><span class="b">off</span><span class="f">)</span><span class="f">)</span> <span class="f">/</span> <span class="c">4</span><span class="f">)</span>
<a name="908" /><span class="False">     908:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PARA_SITE</span><span class="f">(</span><span class="b">ptype</span><span class="f">,</span> <span class="b">clobbers</span><span class="f">,</span> <span class="b">ops</span><span class="f">)</span> <span class="b">_PVSITE</span><span class="f">(</span><span class="b">ptype</span><span class="f">,</span> <span class="b">clobbers</span><span class="f">,</span> <span class="b">ops</span><span class="f">,</span> <span class="f">.</span><span class="m">long</span><span class="f">,</span> <span class="c">4</span><span class="f">)</span>
<a name="909" /><span class="False">     909:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PARA_INDIRECT</span><span class="f">(</span><span class="b">addr</span><span class="f">)</span>    <span class="f">*</span><span class="f">%</span><span class="b">cs</span><span class="f">:</span><span class="b">addr</span>
<a name="910" /><span class="False">     910:</span> <span class="f">#</span><span class="n">endif</span>
<a name="911" /><span class="False">     911:</span> 
<a name="912" /><span class="False">     912:</span> <span class="f">#</span><span class="n">define</span> <span class="b">INTERRUPT_RETURN</span>                        \
<a name="913" /><span class="False">     913:</span>     <span class="b">PARA_SITE</span><span class="f">(</span><span class="b">PARA_PATCH</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">,</span> <span class="b">PV_CPU_iret</span><span class="f">)</span><span class="f">,</span> <span class="b">CLBR_NONE</span><span class="f">,</span>    \
<a name="914" /><span class="False">     914:</span>           <span class="b">jmp</span> <span class="b">PARA_INDIRECT</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">+</span><span class="b">PV_CPU_iret</span><span class="f">)</span><span class="f">)</span>
<a name="915" /><span class="False">     915:</span> 
<a name="916" /><span class="False">     916:</span> <span class="f">#</span><span class="n">define</span> <span class="b">DISABLE_INTERRUPTS</span><span class="f">(</span><span class="b">clobbers</span><span class="f">)</span>                    \
<a name="917" /><span class="False">     917:</span>     <span class="b">PARA_SITE</span><span class="f">(</span><span class="b">PARA_PATCH</span><span class="f">(</span><span class="b">pv_irq_ops</span><span class="f">,</span> <span class="b">PV_IRQ_irq_disable</span><span class="f">)</span><span class="f">,</span> <span class="b">clobbers</span><span class="f">,</span> \
<a name="918" /><span class="False">     918:</span>           <span class="b">PV_SAVE_REGS</span><span class="f">(</span><span class="b">clobbers</span> <span class="f">|</span> <span class="b">CLBR_CALLEE_SAVE</span><span class="f">)</span><span class="f">;</span>        \
<a name="919" /><span class="False">     919:</span>           <span class="b">call</span> <span class="b">PARA_INDIRECT</span><span class="f">(</span><span class="b">pv_irq_ops</span><span class="f">+</span><span class="b">PV_IRQ_irq_disable</span><span class="f">)</span><span class="f">;</span>    \
<a name="920" /><span class="False">     920:</span>           <span class="b">PV_RESTORE_REGS</span><span class="f">(</span><span class="b">clobbers</span> <span class="f">|</span> <span class="b">CLBR_CALLEE_SAVE</span><span class="f">)</span><span class="f">;</span><span class="f">)</span>
<a name="921" /><span class="False">     921:</span> 
<a name="922" /><span class="False">     922:</span> <span class="f">#</span><span class="n">define</span> <span class="b">ENABLE_INTERRUPTS</span><span class="f">(</span><span class="b">clobbers</span><span class="f">)</span>                    \
<a name="923" /><span class="False">     923:</span>     <span class="b">PARA_SITE</span><span class="f">(</span><span class="b">PARA_PATCH</span><span class="f">(</span><span class="b">pv_irq_ops</span><span class="f">,</span> <span class="b">PV_IRQ_irq_enable</span><span class="f">)</span><span class="f">,</span> <span class="b">clobbers</span><span class="f">,</span>    \
<a name="924" /><span class="False">     924:</span>           <span class="b">PV_SAVE_REGS</span><span class="f">(</span><span class="b">clobbers</span> <span class="f">|</span> <span class="b">CLBR_CALLEE_SAVE</span><span class="f">)</span><span class="f">;</span>        \
<a name="925" /><span class="False">     925:</span>           <span class="b">call</span> <span class="b">PARA_INDIRECT</span><span class="f">(</span><span class="b">pv_irq_ops</span><span class="f">+</span><span class="b">PV_IRQ_irq_enable</span><span class="f">)</span><span class="f">;</span>    \
<a name="926" /><span class="False">     926:</span>           <span class="b">PV_RESTORE_REGS</span><span class="f">(</span><span class="b">clobbers</span> <span class="f">|</span> <span class="b">CLBR_CALLEE_SAVE</span><span class="f">)</span><span class="f">;</span><span class="f">)</span>
<a name="927" /><span class="False">     927:</span> 
<a name="928" /><span class="False">     928:</span> <span class="f">#</span><span class="n">define</span> <span class="b">USERGS_SYSRET32</span>                            \
<a name="929" /><span class="False">     929:</span>     <span class="b">PARA_SITE</span><span class="f">(</span><span class="b">PARA_PATCH</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">,</span> <span class="b">PV_CPU_usergs_sysret32</span><span class="f">)</span><span class="f">,</span>    \
<a name="930" /><span class="False">     930:</span>           <span class="b">CLBR_NONE</span><span class="f">,</span>                        \
<a name="931" /><span class="False">     931:</span>           <span class="b">jmp</span> <span class="b">PARA_INDIRECT</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">+</span><span class="b">PV_CPU_usergs_sysret32</span><span class="f">)</span><span class="f">)</span>
<a name="932" /><span class="False">     932:</span> 
<a name="933" /><span class="False">     933:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_X86_32</span>
<a name="934" /><span class="False">     934:</span> <span class="f">#</span><span class="n">define</span> <span class="b">GET_CR0_INTO_EAX</span>                \
<a name="935" /><span class="False">     935:</span>     <span class="b">push</span> <span class="f">%</span><span class="b">ecx</span><span class="f">;</span> <span class="b">push</span> <span class="f">%</span><span class="b">edx</span><span class="f">;</span>                \
<a name="936" /><span class="False">     936:</span>     <span class="b">call</span> <span class="b">PARA_INDIRECT</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">+</span><span class="b">PV_CPU_read_cr0</span><span class="f">)</span><span class="f">;</span>    \
<a name="937" /><span class="False">     937:</span>     <span class="b">pop</span> <span class="f">%</span><span class="b">edx</span><span class="f">;</span> <span class="b">pop</span> <span class="f">%</span><span class="b">ecx</span>
<a name="938" /><span class="False">     938:</span> 
<a name="939" /><span class="False">     939:</span> <span class="f">#</span><span class="n">define</span> <span class="b">ENABLE_INTERRUPTS_SYSEXIT</span>                    \
<a name="940" /><span class="False">     940:</span>     <span class="b">PARA_SITE</span><span class="f">(</span><span class="b">PARA_PATCH</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">,</span> <span class="b">PV_CPU_irq_enable_sysexit</span><span class="f">)</span><span class="f">,</span>    \
<a name="941" /><span class="False">     941:</span>           <span class="b">CLBR_NONE</span><span class="f">,</span>                        \
<a name="942" /><span class="False">     942:</span>           <span class="b">jmp</span> <span class="b">PARA_INDIRECT</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">+</span><span class="b">PV_CPU_irq_enable_sysexit</span><span class="f">)</span><span class="f">)</span>
<a name="943" /><span class="False">     943:</span> 
<a name="944" /><span class="False">     944:</span> 
<a name="945" /><span class="False">     945:</span> <span class="f">#</span><span class="n">else</span>    <span class="k">/* !CONFIG_X86_32 */</span>
<a name="946" /><span class="False">     946:</span> 
<a name="947" /><span class="False">     947:</span> <span class="k">/*</span>
<a name="948" /><span class="False">     948:</span> <span class="k"> * If swapgs is used while the userspace stack is still current,</span>
<a name="949" /><span class="False">     949:</span> <span class="k"> * there&apos;s no way to call a pvop.  The PV replacement *must* be</span>
<a name="950" /><span class="False">     950:</span> <span class="k"> * inlined, or the swapgs instruction must be trapped and emulated.</span>
<a name="951" /><span class="False">     951:</span> <span class="k"> */</span>
<a name="952" /><span class="False">     952:</span> <span class="f">#</span><span class="n">define</span> <span class="b">SWAPGS_UNSAFE_STACK</span>                        \
<a name="953" /><span class="False">     953:</span>     <span class="b">PARA_SITE</span><span class="f">(</span><span class="b">PARA_PATCH</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">,</span> <span class="b">PV_CPU_swapgs</span><span class="f">)</span><span class="f">,</span> <span class="b">CLBR_NONE</span><span class="f">,</span>    \
<a name="954" /><span class="False">     954:</span>           <span class="b">swapgs</span><span class="f">)</span>
<a name="955" /><span class="False">     955:</span> 
<a name="956" /><span class="False">     956:</span> <span class="k">/*</span>
<a name="957" /><span class="False">     957:</span> <span class="k"> * Note: swapgs is very special, and in practise is either going to be</span>
<a name="958" /><span class="False">     958:</span> <span class="k"> * implemented with a single &quot;swapgs&quot; instruction or something very</span>
<a name="959" /><span class="False">     959:</span> <span class="k"> * special.  Either way, we don&apos;t need to save any registers for</span>
<a name="960" /><span class="False">     960:</span> <span class="k"> * it.</span>
<a name="961" /><span class="False">     961:</span> <span class="k"> */</span>
<a name="962" /><span class="False">     962:</span> <span class="f">#</span><span class="n">define</span> <span class="b">SWAPGS</span>                                \
<a name="963" /><span class="False">     963:</span>     <span class="b">PARA_SITE</span><span class="f">(</span><span class="b">PARA_PATCH</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">,</span> <span class="b">PV_CPU_swapgs</span><span class="f">)</span><span class="f">,</span> <span class="b">CLBR_NONE</span><span class="f">,</span>    \
<a name="964" /><span class="False">     964:</span>           <span class="b">call</span> <span class="b">PARA_INDIRECT</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">+</span><span class="b">PV_CPU_swapgs</span><span class="f">)</span>        \
<a name="965" /><span class="False">     965:</span>          <span class="f">)</span>
<a name="966" /><span class="False">     966:</span> 
<a name="967" /><span class="False">     967:</span> <span class="f">#</span><span class="n">define</span> <span class="b">GET_CR2_INTO_RAX</span>                \
<a name="968" /><span class="False">     968:</span>     <span class="b">call</span> <span class="b">PARA_INDIRECT</span><span class="f">(</span><span class="b">pv_mmu_ops</span><span class="f">+</span><span class="b">PV_MMU_read_cr2</span><span class="f">)</span>
<a name="969" /><span class="False">     969:</span> 
<a name="970" /><span class="False">     970:</span> <span class="f">#</span><span class="n">define</span> <span class="b">PARAVIRT_ADJUST_EXCEPTION_FRAME</span>                    \
<a name="971" /><span class="False">     971:</span>     <span class="b">PARA_SITE</span><span class="f">(</span><span class="b">PARA_PATCH</span><span class="f">(</span><span class="b">pv_irq_ops</span><span class="f">,</span> <span class="b">PV_IRQ_adjust_exception_frame</span><span class="f">)</span><span class="f">,</span> \
<a name="972" /><span class="False">     972:</span>           <span class="b">CLBR_NONE</span><span class="f">,</span>                        \
<a name="973" /><span class="False">     973:</span>           <span class="b">call</span> <span class="b">PARA_INDIRECT</span><span class="f">(</span><span class="b">pv_irq_ops</span><span class="f">+</span><span class="b">PV_IRQ_adjust_exception_frame</span><span class="f">)</span><span class="f">)</span>
<a name="974" /><span class="False">     974:</span> 
<a name="975" /><span class="False">     975:</span> <span class="f">#</span><span class="n">define</span> <span class="b">USERGS_SYSRET64</span>                            \
<a name="976" /><span class="False">     976:</span>     <span class="b">PARA_SITE</span><span class="f">(</span><span class="b">PARA_PATCH</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">,</span> <span class="b">PV_CPU_usergs_sysret64</span><span class="f">)</span><span class="f">,</span>    \
<a name="977" /><span class="False">     977:</span>           <span class="b">CLBR_NONE</span><span class="f">,</span>                        \
<a name="978" /><span class="False">     978:</span>           <span class="b">jmp</span> <span class="b">PARA_INDIRECT</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">+</span><span class="b">PV_CPU_usergs_sysret64</span><span class="f">)</span><span class="f">)</span>
<a name="979" /><span class="False">     979:</span> 
<a name="980" /><span class="False">     980:</span> <span class="f">#</span><span class="n">define</span> <span class="b">ENABLE_INTERRUPTS_SYSEXIT32</span>                    \
<a name="981" /><span class="False">     981:</span>     <span class="b">PARA_SITE</span><span class="f">(</span><span class="b">PARA_PATCH</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">,</span> <span class="b">PV_CPU_irq_enable_sysexit</span><span class="f">)</span><span class="f">,</span>    \
<a name="982" /><span class="False">     982:</span>           <span class="b">CLBR_NONE</span><span class="f">,</span>                        \
<a name="983" /><span class="False">     983:</span>           <span class="b">jmp</span> <span class="b">PARA_INDIRECT</span><span class="f">(</span><span class="b">pv_cpu_ops</span><span class="f">+</span><span class="b">PV_CPU_irq_enable_sysexit</span><span class="f">)</span><span class="f">)</span>
<a name="984" /><span class="False">     984:</span> <span class="f">#</span><span class="n">endif</span>    <span class="k">/* CONFIG_X86_32 */</span>
<a name="985" /><span class="False">     985:</span> 
<a name="986" /><span class="False">     986:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* __ASSEMBLY__ */</span>
<a name="987" /><span class="True">     987:</span> <span class="f">#</span><span class="n">else</span>  <span class="k">/* CONFIG_PARAVIRT */</span>
<a name="988" /><span class="True">     988:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_ZGVmYXVsdF9iYW5uZXJfMA__"><span class="b">default_banner</span></a> <span class="b">x86_init_noop</span>
<a name="989" /><span class="True">     989:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* !CONFIG_PARAVIRT */</span>
<a name="990" /><span class="True">     990:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* _ASM_X86_PARAVIRT_H */</span>
<a name="991" /><span class="True">     991:</span> </pre>
  </body>
</html>
